Core JavaScript 1.5 Reference:Global Objects:Date:getUTCMonth
From MDC
Contents |
[edit] Summary
Returns the month of the specified date according to universal time.
| Method of Date | |
| Implemented in: | JavaScript 1.3 |
| ECMA Version: | ECMA-262 |
[edit] Syntax
getUTCMonth()
[edit] Parameters
None.
[edit] Description
The value returned by getUTCMonth is an integer between 0 and 11 corresponding to the month. 0 for January, 1 for February, 2 for March, and so on.
[edit] Examples
[edit] Example: Using getUTCMonth
The following example assigns the month portion of the current date to the variable mon.
var mon; Today = new Date(); mon = Today.getUTCMonth();