Please enable JavaScript to view this site.

 

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 forward slash /.

 

Usually, the main reason for calling this function is to determine if the current holiday is a fully confirmed nationwide holiday (in which case the observance is an empty string) or a partial holiday (in which case the observance lists the restriction(s) in the observance of this holiday).

 

Note that one of the observance labels is tentative which, it could be argued, is a qualification rather than a restriction of scope of the holiday.

 

The macro code below checks if any of the holidays of the holidays set nHolSetID is a fully confirmed 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

 

When you copy one of the holidays from the qppstudio worldwide public holidays database, you cannot modify that rule, as it is used in holidays synchronization.

 

The observance of each holiday is part of its recurring rule, and cannot be modified either. However, in some cases, you might want to treat some holidays as full holidays (ie. with no observance), in particular when using the present GetHolObservanceFromTable macro function.

 

See also: GetHolDateFromTable, GetHolIdFromTable, GetHolTextFromTable, GetHolNameFromTable.

 


Topic 176770, last updated on 13-Sep-2026