ISOWeekDate

STD.Date.ISOWeekDate( date[, extended])

dateA date value in the Date_t format.
extendedOptional BOOLEAN. If TRUE, returns the ISO week date in extended form (e.g., 2018-W23-7). If FALSE (default), returns compact form (e.g., 2018W237).
Return:ISOWeekDate returns a STRING representing the ISO-8601 week date for the given date.

The ISOWeekDate function returns the ISO-8601 week date for the given date, in either extended or compact form. This is an ISO-8601 implementation of computing week numbers ("week dates").

Example:

IMPORT STD;
D := 20211231;
WeekDate := STD.Date.ISOWeekDate(D, TRUE);
      // WeekDate is "2021-W52-5" for December 31, 2021
OUTPUT(WeekDate);