Please enable JavaScript to view this site.


bool = HolidayOfListOnDate(sHolListChar, nDate)


This macro function checks if there is at least one holiday or one-time-date for the holidays list sHolListChar in the period ranging from nDate1 to nDate2, inclusively.


The allowed values for sHolListChar are any of the following: 'a', 'e', 'i', 'o', 'u'.


This function is useful if you only want to know that there is at least one holiday occurrence on a given day, but do not care what the details are.


The macro code below checks if there is an a-holiday on the date of the incoming macro token and, if so, changes itself to red.

sResult = '[' + s_LangDayToken + ']'
if HolidayOfListOnDate('a', n_TokenDate)
   sResult = FormatText(sResult, 'COLOR(RED)', -1))

See also: HolidayOfListInPeriod and HolidayOfSetOnDate.


Topic 125200, last updated on 01-Aug-2020