Please enable JavaScript to view this site.

 

int = chDayOf(nWesternDate)

 

This macro function returns the lunar day part of the Chinese date corresponding to the date nWesternDate.

 

This function can be used to mimic the [chd] and [chdd] tokens, as in the macro below.

// manually calculate the tokens [chd] and [chdd]
nLunarDay = chDayOf(n_TokenDate)
// convert lunar day number to Chinese characters
sChLunarDay = IntToStrChinese(nLunarDay)
// display the result on 2 separate lines
sResult = '[chd] is ' + sChLunarDay
sResult = sResult + chr(13)
sResult = sResult + '[chdd] is ' + sChLunarDay + '日'

See also: chIntToStr and other chinese dates functions.

 


Topic 160000, last updated on 18-Apr-2020