Please enable JavaScript to view this site.


int = GetHolDateFromTable()


This macro function returns the date 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.


In practice, the function GetHolDateFromTable is rarely used, as the 2 functions which can move the holidays table cursor are either defined as being for a fixed date (FindNextHolidayOnDate), or supply the date of the holiday as a result of being called (GetNextDateForHolidayId).


The macro code below uses the function GetHolDateFromTable to check if the holiday table's cursor is still positioned where we think it is (such a check is almost never needed).

// find the first occurence of the holiday in year nYear
nDate1 = GetNextDateForHolidayId(nHolidayId,nYear)
nDate2 = GetNextDateForHolidayId(nHolidayId,nYear)
// do some lengthy processing which might move the cursor
// ...
// check that the holidays table's cursor is till where we left it
Assert(nDate2 == GetHolDateFromTable(), 'Lost cursor position', true)
// continue
// ...

See also: GetHolAbbreviationFromTable, GetHolIdFromTable, GetHolTextFromTable, GetHolNameFromTable.


Topic 105135, last updated on 18-Apr-2020