Navigation:  Macros > Macro Language > Built-in Functions > All Functions (Alphabetical) >


Previous pageReturn to chapter overviewNext page

int = chDateSolarTermOnOrAfter(nAnyRegularDate)


This macro function returns the closest date, on the date of nAnyRegularDate or after, on which a Solar Term occurs. Note that this function returns the date of the most recent Solar Term, not its name or index. The result of this function is usually used, as in the example below, to modify the date of the incoming token.



   bResult = true

   sResult = '[' + s_LangDayToken + ']'

   nResult = chDateSolarTermOnOrAfter(FirstDateOfMonth(n_TokenYear, n_TokenMonth))



The above example will shift the date of any incoming token to the date of the first solar term of the current Gregorian month. Note that there are never more than 2 solar terms for any given month (either Gregorian or Chinese Lunar), and that the minor term usually occurs around the 5th of each month, and the major term around the 21st of each month (plus or minus 2 days).


See also : chDateSolarTermOnOrBefore, Chinese Dates Functions.

Topic 176705 updated on 01-Nov-2016.
Topic URL: