startOfWeekYear
Modified on Thu, 24 Aug 2023
Description
Use this function to obtain the start of a local week-numbering year for the given date. The result will be in the local timezone.
Syntax
startOfWeekYear(date, options)
Returns
Return Value | Description |
---|---|
Date | Returns a Date object representing the start of the local week-numbering year for the given date in the local timezone. |
Sample
Example | Result | Description |
---|---|---|
startOfWeekYear(2023-04-09, { weekStartsOn: 1 }) | 2023-01-02 | Returns the start of the week year for April 9, 2023, considering Monday as the first day of the week. |
To view all the Date functions, click here.
See Also
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article