str = GetHolObservanceFromTable()
This macro function returns the observance of the current holiday in the holidays table.
➢The current holiday in the holidays table is due to previous calls to functions which move the cursor in the holidays table, such as FindNextHolidayOnDate and GetNextDateForHolidayId.
The returned string contains all the observance attributes of the current holiday, separated by a front-slash /. Usually, the main reason for calling this function is to determine if the current holiday is a full nationwide holiday (in which case the observance is an empty string).
The macro code below checks if any of the holidays of the holidays set nHolSetID is a full nationwide holiday.
sResult = ''
bOneFullHolidayAtLeast = false
// initialize the holidays table
Reset_FindNextHolidayOnDate()
// find the first holiday, if any, of set nHolSetID
while FindNextHolidayOnDate(n_TokenDate, nHolSetID)
sObservance = GetHolObservanceFromTable()
if sObservance = '' // we have one full nationwide holiday
bOneFullHolidayAtLeast = true
break // no need to look any further
endif
endwhile
Holidays copied from the World Holidays Database
In such cases, use the ignore observance option to have a specific holiday be treated as a holiday with no observance, in all respects, except for holidays synchronization.
See also: GetHolDateFromTable, GetHolIdFromTable, GetHolTextFromTable, GetHolNameFromTable.
Topic 176770, last updated on 07-Oct-2020