Skip to content

getWeekOfYear Type documentation

TypeScript declaration

import { getWeekOfYear } from '@siemens/element-ng/datepicker';

Returns the ISO-8601 week number for the user's week containing the specified date. ISO-8601 weeks always start on Monday. When the user's week starts on Sunday or Saturday, the date is adjusted to find the corresponding ISO week (based on the Thursday rule). 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

getWeekOfYear(date: Date, weekStart: WeekStart): number

Returns the ISO-8601 week number for the user's week containing the specified date. ISO-8601 weeks always start on Monday. When the user's week starts on Sunday or Saturday, the date is adjusted to find the corresponding ISO week (based on the Thursday rule). 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

Types Documentation

WeekStart

'monday' | 'saturday' | 'sunday' | undefined
type alias
import type { WeekStart } from '@siemens/element-ng/datepicker';


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