Skip to content

getWeekOfYear Type documentation

(date: Date, weekStart: WeekStart) => number
Function
Gets the week number of the specified date.
Week number according to the ISO-8601 standard, weeks starting on Monday.
The first week of a year is the week that contains the first Thursday of the year (='First 4-day week').
The highest week number in a year is either 52 or 53.
-
Returns The number of the Week
Parameters
The JavaScript date object.
date: Date
Name of the first day of the week
weekStart: WeekStart

Types Documentation

("monday" | "saturday" | "sunday" | undefined)

Except where otherwise noted, content on this site is licensed under MIT License.