isoWeekNumber

Calendar
stable

Returns the ISO 8601 week number for a given Date. Week 1 is the week containing the year's first Thursday (Thursday-of-week / first-Thursday-of-year algorithm).

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

date
required
Date
The date whose ISO week number is computed.

API

Return value

The value returned by this util.

Integer week number in the range [1, 53] per ISO 8601.

Usage

Examples

Ready-to-paste usage snippets.

ISO week number for specific dates

typescript