English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript getUTCMonth() method

 JavaScript Date Object

ThegetUTCMonth()Returns the month of a specific date object based on UTC (0-11).

getUTCMonth()The returned value is an integer corresponding to the month of the year:1Represents 0,2Represents1, and so on.

World Standard Time (UTC) is the time standard set for world time.

For the day of the week, seegetUTCDay()Method.

For a specific day of the month, seegetUTCDate()Method.

Syntax:

date.getUTCMonth()
var d = new Date();
d.getUTCMonth();
Test and See ‹/›

Browser compatibility

All browsers fully support the getUTCMonth() method:

Method
getUTCMonth()isisisisis

Technical Details

Return Value:0 to11as an integer between 0 and
JavaScript Version:ECMAScript 1

More Examples

Return the month of the year from a specific date and time:

var d = new Date(#39;August 20, 1999, 23:15:30 GMT+11:00');
d.getUTCMonth();
Test and See ‹/›

The month variable holds the name of the month:

var arr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var d = new Date();
var month = arr[d.getUTCMonth()];
Test and See ‹/›

 JavaScript Date Object