English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
date.getUTCMonth()
var d = new Date(); d.getUTCMonth();Test and See ‹/›
All browsers fully support the getUTCMonth() method:
Method | |||||
getUTCMonth() | is | is | is | is | is |
Return Value: | 0 to11as an integer between 0 and |
---|---|
JavaScript Version: | ECMAScript 1 |
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 ‹/›