Returns a date, datetime, or datetimezone value for the end of the week.
Date.StartOfWeek(dateTime as any, optional firstDayOfWeek as nullable number) as any
|dateTime||The date, datetime, or datetimezone to check against.|
|optional firstDayOfWeek||A number value as an enum value to set the last day of the week. The default value for firstDayOfWeek is Day.Sunday.|
Day Enum Values
Day.Sunday = 0;
Day.Monday = 1;
Day.Tuesday = 2;
Day.Wednesday = 3;
Day.Friday = 5;
The date and time portions are reset to their initial values for the week.
The timezone information is persisted.
let dateTime = DateTimeZone.FromText("2011-02-24T12:30:00-08:00") in Date.EndOfWeek(dateTime, Day.Sunday) equals 2011-02-26T23:59:59.9999999-08:00