August 1999
Intermediate to advanced
1488 pages
72h 53m
English
date.setUTCMonth(month)
The setUTCMonth() method sets the month in the Date object to the argument month, an integer from 0 (January) to 11 (December) universal time. The method returns an integer representing the number of milliseconds between midnight January 1, 1970 (GMT) to the date and time specified in the Date object after the month has been adjusted.
The code in Listing 6.105 displays the current date in milliseconds (universal time) before setting the month to 4 (May). Notice that the milliseconds specified after the setUTCMonth() method are the same as the result returned from the method.
Read now
Unlock full access