A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/Date/getMonth below:

getMonth ยท WebPlatform Docs

getMonth Summary

Gets the month, using local time.

Syntax
dateObj.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.

Examples

The 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 Attributions

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