startOfWeekFixed

Calendar
stable

Return a new Date at midnight of the first day of the week containing the given date, using an explicit firstDayOfWeek integer. Unlike startOfWeek, locale is never consulted.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

date
requis
Date
The reference date. Time fields are cleared to 00:00:00.000 on the result.
firstDayOfWeek
requis
number
Day-of-week index for the first day (0 = Sunday, 1 = Monday … 6 = Saturday). Passed directly as a calendar prop.

API

Valeur de retour

La valeur retournée par cet util.

A new Date at 00:00:00.000 of the first day of the week.

Usage

Exemples

Extraits de code prêts à coller.

Week start on Monday (1)

typescript