str = GetHolSetSymbolFontOfId(nHolSetId)
This macro function returns the name of the symbol font of the holidays set with ID given by nHolSetId.
This function is often used in holidays pages where the holidays of many countries are listed one after the other, and you wish to display the default symbols of each holidays set, rather than the symbols of the individual holidays themselves.
The following macro code lists all the holidays sets of the a-holidays of the current script, each with its name followed by its default symbols in parentheses, displayed using the correct symbol font.
// get all the holidays of nHolSetID on nDate
sRESULT = ''
sCurHolList = SetHolidaysList('a')
nListIndex = 1 // the index position in the a-holidays list
nHolidaysSetID = GetNthHolSetId(sCurHolList, nListIndex)
// loop over the HolidaySets in current Holidays List
while nHolidaysSetID <> 0
// get the symbols in the right font
sDefaultSymbols = GetHolSetDefaultSymbolsOfId(nCurSetId)
sSymbolFont = GetHolSetSymbolFontOfId(nCurSetId)
sFormattedSymbols = FormatText(sDefaultSymbols, 'f ' + sSymbolFont, -1)
// build the current holidays set's string
sResult = sResult + chr(13)
sResult = sResult + GetHolSetNameOfId(nCurSetId)
sResult = sResult + ' (' + sFormattedSymbols + ')'
// prepare for next iteration
inc(nListIndex)
nHolidaysSetID = GetNthHolSetId(sCurHolList, nListIndex)
endwhile
See also: GetNthHolSetId, GetHolSetNameOfId, GetHolSetDefaultSymbolsOfId.
Topic 178130, last updated on 18-Apr-2020