endOfWeek

Commons
stable

Returns the last day of the ISO week containing the given date, respecting the locale's first-day-of-week setting. The input date is not mutated.

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
Any date within the target week.
locale
requis
string
BCP 47 locale string (e.g. "en-US", "fr-FR"). The last two characters determine the first day of the week used to derive the last day.

API

Valeur de retour

La valeur retournée par cet util.

A new Date set to the last day of the week for the given locale.

Usage

Exemples

Extraits de code prêts à coller.

Last day of the week per locale

typescript