Please enable JavaScript to view this site.


int = GetNthHolSetId(sHolidaysListChar,nIndexInList)


This macro function returns the holidays set id corresponding to the holidays set in the position nIndexInList of the specified holidays list.


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


The possible values for nIndexInList are 1 to 127. You do not need to worry about the number of holidays sets in the specified holidays list; if the value of nIndexInList you pass to the function is larger than the number of holidays sets contained in the holidays list, then the function returns 0.


The following macro code lists the names of all the holidays sets of the a-holidays of the current script.

// 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
   sResult = sResult + chr(13// new line
   sResult = sResult + GetHolSetNameOfId(nCurSetId)
   // prepare for next iteration   
   nHolidaysSetID = GetNthHolSetId(sCurHolList, nListIndex)

See also: GetHolSetNameOfId.


Topic 105138, last updated on 01-Aug-2020