Please enable JavaScript to view this site.

 

str = GetHolSetAbbreviationOfId(nHolSetId)

 

This macro function returns the default abbreviation 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 abbreviation of each holidays set, rather than the abbreviations of the holidays themselves.

 

 

For example, if the above page was generated from all the holidays sets contained in the a-holidays of the current script, then the leftmost column, with the country names and abbreviations would be generated using the following macro code.

// get all the holidays sets names of a-holidays
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
   // use the current Holidays Set Id (nCurHolSet)
   sResult = sResult + chr(13)
   sResult = sResult + GetHolSetNameOfId(nCurSetId)
   sResult = sResult + ' (' + GetHolSetAbbreviationOfId(nCurSetId) + ')'
   // prepare for next iteration   
   inc(nListIndex)
   nHolidaysSetID = GetNthHolSetId(sCurHolList, nListIndex)
endwhile

See also: GetNthHolSetId, GetHolSetNameOfId, GetHolSetDefaultSymbolsOfId.

 


Topic 175240, last updated on 01-Aug-2020