WeekNumber
Previous  Top  Next

WeekNumber method returns a LONG that is the ISO Week Number of the Passed Date. An Optional Flag is used if you are using a calendar where the Week Starts on Monday. Then the Passed SMon Byte should be set to 1.

The WeekNumber method auto-corrects according to ISO standards and Jan 1 will correctly return Week 52 or 53 of the previous year.

weeknumber

This generates the following code in the embed:

BHT:WkOfYr = BSTCalH.WeekNumber(BHT:Date)

or
with optional Wk Starts on Monday Byte

BHT:WkOfYr = BSTCalH.WeekNumber(BHT:Date,BHT:WkMonFlag)