The result Date
type, it is the type returned from the context function if it is passed, or inferred from the arguments.
The date to be changed
The week of the new date
Optional
options: SetWeekOptions<ResultDate>An object with options
The new date with the local week set
Set the local week to the given date, saving the weekday number.
The exact calculation depends on the values of
options.weekStartsOn
(which is the index of the first day of the week)
and options.firstWeekContainsDate
(which is the day of January, which is always in
the first week of the week-numbering year)
Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
The
Date
type, the function operates on. Gets inferred from passed arguments. Allows to use extensions likeUTCDate
.