Please enable JavaScript to view this site.

 

bool = GetHolIsDupBaseFromTable()

 

This macro function returns true if the current holiday in the holidays table is the base date of recurrence rule that has generated a day in lieu.

 

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.

 

Referring to the example on the right (Christmas in Singapore) we see that its recurrence rule specifies that if December 25 falls on a Sunday, then a day in lieu (or substitute) holiday also occurs on the next Monday.

 

If the holidays table cursor is positioned on this specific holiday ID, then a call to the function GetHolIsDupBaseFromTable will return the following:

 

False on Saturday, December 25, 2021, as this holiday triggers no day in lieu in 2021.

True on Sunday, December 25, 2022, as this is the base date of the day in lieu which is triggered in 2022.

False on Monday, December 25, 2022, as this is the lieu date of the day in lieu which is triggered in 2022.

False on Monday, December 25, 2023, as this holiday triggers no day in lieu in 2023.

 

Note, from the above, that a holiday occurrence will only cause GetHolIsDupBaseFromTable to be true if a day in lieu has been triggered. The usual unmoved date, does not cause GetHolIsDupBaseFromTable to be true.

 

See also: GetHolIsDupLieuFromTable.

 


Topic 178565, last updated on 20-May-2020