GetHolNameFromTable
str = GetHolNameFromTable()
This macro function returns the name in rich text format (RTF) of the current holiday in the holidays table.
// initialize the holidays table
Reset_FindHolidayOnDate()
// check if there is a holiday today
if FindHolidayOnDate(Today(), nHolSet)
sName = GetHolNameFromTable()
sRESULT = 'The formatted holiday name is "' + sName + '"'
endif
This function returns formatted text which includes format markers. An example of such text is :
Daylight Saving Time **RICH**begins**TEXT** on **RICH**02 april **TEXT**at 2 am.
These markers ensure that if you can include the result of this function into a string variable, such as sRESULT, and get correcrtly formatted text as the output of your macro.
Daylight Saving Time begins on 02 april at 2 am.
However, if you only need to get the plain text part of a holiday name, for example to see if it contains some given text, you should use the GetHolTextFromTable function instead.
Note :
•The 4 functions GetHolDateFromTable, GetHolIdFromTable, GetHolTextFromTable, and GetHolNameFromTable are used to read information about the current holiday record in the holidays table. If you need to get the value of a holidays list token, you should use the EvalTokenfunction.
•To set the current record to a desired holiday occurrence you would use one of the functions such as : FindHolidayOnDate or GetDateForHolidayIdOfYear.
This function is part of a set of advanced functions that give you direct access to the holidays tables (see Using Built-in Holidays Functions).