BSTCalH.IsHoliday PROCEDURE(LONG pDate),STRING,VIRTUAL
IsHoliday Method creates a Queue for the Holidays based on the Flags and Year from the passed Date. IsHoliday looks up the date in the queue and returns the string(256) with the Holiday Name(s) if one exists for the Passed Date. It will look for Multiple holidays on the passed date, and return a string with holiday names separated by "<13,10>"
IsHoliday loads a queue dependant on the Passed Year and Flag settings. It will dynamically reload the queue when the passed year changes or if the Country code changes. If you change other Flags, you can force a refresh with the ResetQ Flag.
Standard Usage
BHT:Holiday = CLIP(BSTCalH.IsHoliday(BHT:Date))
Multiple Holidays returned would use something like the following code to Process.
BHT:Holiday = CLIP(BSTCalH.IsHoliday(BHT:DATE))
IF BHT:Holiday <> ''
LOOP
IF INSTRING('<13,10>',BHT:Holiday,1,1)
InStr# = INSTRING('<13,10>',BHT:Holiday,1,1)
MainQ.Date = BHT:DATE
MainQ.Display = CLIP(SUB(BHT:Holiday,1,InStr# - 1))
ADD(MainQ)
BHT:Holiday = SUB(BHT:Holiday,InStr# + 2,LEN(CLIP(BHT:Holiday))- InStr# + 2)
ELSE
MainQ.Date = BHT:DATE
MainQ.Display = CLIP(BHT:Holiday)
ADD(MainQ)
BREAK
END
END !LOOP
END !IF BHT:Holiday <> ''