Week functions¶
Include: Use System\DateTime.pkg
Week functions calculate weekday, week number, and ISO week-year values from a DateTime.
Functions¶
| Function | Signature | Description |
|---|---|---|
DateGetDayofWeek_WDS |
Function DateGetDayofWeek_WDS Global DateTime dtValue Integer iWeekDayStart Returns Integer |
Returns weekday using the supplied week start; 1 is Sunday, 2 is Monday. |
DateGetWeekOfYear_WDS |
Function DateGetWeekOfYear_WDS Global DateTime dtValue Integer iWeekDayStart Returns Integer |
Returns week of year using the supplied week start; week 1 contains January 1. |
DateGetWeekOfYear |
Function DateGetWeekOfYear Global DateTime dtValue Returns Integer |
Returns the standard week of year. |
DateGetDayofWeekISO |
Function DateGetDayofWeekISO Global DateTime dtValue Returns Integer |
Returns ISO weekday. |
DateGetYearOfWeekISO |
Function DateGetYearOfWeekISO Global DateTime dtValue Returns Integer |
Returns ISO week-year. |
DateGetWeekOfYearISO |
Function DateGetWeekOfYearISO Global DateTime dtValue Returns Integer |
Returns ISO week number; weeks start Monday and week 1 contains Thursday. |
Syntax¶
Function DateGetDayofWeek_WDS Global DateTime dtValue Integer iWeekDayStart Returns Integer
Function DateGetWeekOfYear_WDS Global DateTime dtValue Integer iWeekDayStart Returns Integer
Function DateGetWeekOfYear Global DateTime dtValue Returns Integer
Function DateGetDayofWeekISO Global DateTime dtValue Returns Integer
Function DateGetYearOfWeekISO Global DateTime dtValue Returns Integer
Function DateGetWeekOfYearISO Global DateTime dtValue Returns Integer
Example¶
DateTime dtValue
Integer iWeek
Get DateSet 2026 1 5 to dtValue
Get DateGetWeekOfYearISO dtValue to iWeek