This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

getUTCMonth

Summary

Gets the month of a Date object using Universal Coordinated Time (UTC).

Syntax

dateObj.getUTCMonth()

Return Value

Returns an integer between 0 (January) and 11 (December).

Examples

The following example shows how to use the getUTCMonth method.

var date = new Date("2/2/2002");
 document.write(date.getUTCMonth());

 // Output: 1

Remarks

The required dateObj reference is a Date object. To get the month in local time, use the getMonth method.

See also

Other articles

Attributions

  • Microsoft Developer Network: Article