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.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- daterequisDate
- Any date within the target week.
- localerequisstring
- 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