getMonth

Commons
stable

Returns the zero-based month index (0 = January, 11 = December) of a Date object. Thin semantic wrapper around Date.prototype.getMonth().

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 Date instance from which to extract the month index.

API

Valeur de retour

La valeur retournée par cet util.

An integer between 0 (January) and 11 (December).

Usage

Exemples

Extraits de code prêts à coller.

Extract month index from a date

typescript