Name
Date.setMonth( ) Method — assign the month of the year
Availability
Flash 5
Synopsis
date.setMonth(month)
Arguments
- month
An integer from 0 (January) to 11 (December), not from 1 to 12, representing the new month of the year of
date
. Values above 11 or below are carried over to the year ofdate
.
Returns
An integer representing the number of milliseconds between the new date and midnight, January 1, 1970.
Usage
Be careful not to assume that 1 is January! Months start at 0, not 1.
See Also
Date.getMonth( )
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.