endOfYear

Commons
stable

Returns a new Date set to December 31 of the year containing the given date (midnight local time). 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 year. Only the year part is used.

API

Valeur de retour

La valeur retournée par cet util.

A new Date at midnight on December 31 of the same year as the input.

Usage

Exemples

Extraits de code prêts à coller.

Last day of the year

typescript