Gets the month, using local time.
SyntaxdateObj.getMonth()
Return Value
The getMonth method returns an integer between 0 (January) and 11 (December). For a Date constructed with "Jan 5, 1996", getMonth returns 0.
ExamplesThe following example shows how to use the getMonth method.
var date = new Date("1/1/2001");
document.write(date.getMonth());
Remarks
The required dateObj reference is a Date object. To get the month value using Universal Coordinated Time (UTC), use the getUTCMonth method.
See also Other articles AttributionsMicrosoft Developer Network: Article
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4