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
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- daterequiredDate
- The Date instance from which to extract the month index.
API
Return value
The value returned by this util.
- An integer between 0 (January) and 11 (December).
Usage
Examples
Ready-to-paste usage snippets.
Extract month index from a date