Name

getMonth() — NN 2 IE J1 ECMA 1

Synopsis

Returns a zero-based integer corresponding to the month value for the date specified by the Date object. That this method’s values are zero-based frequently confuses scripters at first.

Returned Value

Integer between and 11. January is 0, February is 1, and December is 11.

Parameters

None.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.