Product Site

5.4.6.11. fromWeekNumberDate (Class Method)

Returns a new DateTime object, created from a string in ISO week date format. The time component will be set to 00:00:00.000000.

Both the basic format yyyyWwwd and the extended format yyyy-Www-d are accepted, where ww is the ordinal number of an ISO week within year yyyy, and d is the ordinal number of the calender day within the week. The allowed range for ww is 1 through the number of ISO weeks in year yyyy, which is either 52 or 53. Leading zeros are required for both yyyy and ww. The allowed range for d is 1 through 7, where Monday is 1, Tuesday is 2, running through 7 for Sunday.

If specified, offset is the offset from UTC, in minutes. The offset must be a valid whole number between -900 and 900 or an equivalent TimeSpan instance. The default offset is the current system timezone offset.

See also methods weekNumberDate, weekNumberYear, and weekDay.

Example 5.229. DateTime class — fromWeekNumberDate method
say .DateTime~fromWeekNumberDate("2020-W07-1")    -- 2020-02-10T00:00:00.000000