Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Date | |||
Object
|
+-Date
public class Date
extends Object
The Date class lets you retrieve date and time values relative to universal time (Greenwich mean time, now called universal time or UTC) or relative to the operating system on which Flash Player is running. The methods of the Date class are not static but apply only to the individual Date object specified when the method is called. The Date.UTC() method is an exception; it is a static method.
The Date class handles daylight saving time differently, depending on the operating system and Flash Player version. Flash Player 6 and later versions handle daylight saving time on the following operating systems in these ways:
Flash Player 5 handles daylight saving time on the following operating systems as follows:
To call the methods of the Date class, you must first create a Date object using the constructor for the Date class, described later in this section.
Availability: ActionScript 1.0; Flash Player 5
Properties inherited from class Object constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)
|
Signature |
Description |
|---|---|
|
Date |
Constructs a new Date object that holds the specified date and time. |
|
Modifiers |
Signature |
Description |
|---|---|---|
|
|
Returns the day of the month (an integer from 1 to 31) of the specified Date object according to local time. |
|
|
|
Returns the day of the week (0 for Sunday, 1 for Monday, and so on) of the specified Date object according to local time. |
|
|
|
getFullYear |
Returns the full year (a four-digit number, such as 2000) of the specified Date object, according to local time. |
|
|
Returns the hour (an integer from 0 to 23) of the specified Date object, according to local time. |
|
|
|
Returns the milliseconds (an integer from 0 to 999) of the specified Date object, according to local time. |
|
|
|
getMinutes |
Returns the minutes (an integer from 0 to 59) of the specified Date object, according to local time. |
|
|
Returns the month (0 for January, 1 for February, and so on) of the specified Date object, according to local time. |
|
|
|
getSeconds |
Returns the seconds (an integer from 0 to 59) of the specified Date object, according to local time. |
|
|
Returns the number of milliseconds since midnight January 1, 1970, universal time, for the specified Date object. |
|
|
|
Returns the difference, in minutes, between the computer's local time and universal time. |
|
|
|
getUTCDate |
Returns the day of the month (an integer from 1 to 31) in the specified Date object, according to universal time. |
|
|
Returns the day of the week (0 for Sunday, 1 for Monday, and so on) of the specified Date object, according to universal time. |
|
|
|
getUTCFullYear |
Returns the four-digit year of the specified Date object, according to universal time. |
|
|
getUTCHours |
Returns the hour (an integer from 0 to 23) of the specified Date object, according to universal time. |
|
|
Returns the milliseconds (an integer from 0 to 999) of the specified Date object, according to universal time. |
|
|
|
getUTCMinutes |
Returns the minutes (an integer from 0 to 59) of the specified Date object, according to universal time. |
|
|
getUTCMonth |
Returns the month (0 [January] to 11 [December]) of the specified Date object, according to universal time. |
|
|
getUTCSeconds |
Returns the seconds (an integer from 0 to 59) of the specified Date object, according to universal time. |
|
|
getUTCYear |
Returns the year of this |
|
|
Returns the year of the specified Date object, according to local time. |
|
|
|
Sets the day of the month for the specified Date object, according to local time, and returns the new time in milliseconds. |
|
|
|
setFullYear |
Sets the year of the specified Date object, according to local time and returns the new time in milliseconds. |
|
|
Sets the hours for the specified Date object according to local time and returns the new time in milliseconds. |
|
|
|
setMilliseconds |
Sets the milliseconds for the specified Date object according to local time and returns the new time in milliseconds. |
|
|
setMinutes |
Sets the minutes for a specified Date object according to local time and returns the new time in milliseconds. |
|
|
Sets the month for the specified Date object in local time and returns the new time in milliseconds. |
|
|
|
setSeconds |
Sets the seconds for the specified Date object in local time and returns the new time in milliseconds. |
|
|
Sets the date for the specified Date object in milliseconds since midnight on January 1, 1970, and returns the new time in milliseconds. |
|
|
|
setUTCDate |
Sets the date for the specified Date object in universal time and returns the new time in milliseconds. |
|
|
setUTCFullYear |
Sets the year for the specified Date object (my_date) in universal time and returns the new time in milliseconds. |
|
|
setUTCHours |
Sets the hour for the specified Date object in universal time and returns the new time in milliseconds. |
|
|
setUTCMilliseconds |
Sets the milliseconds for the specified Date object in universal time and returns the new time in milliseconds. |
|
|
setUTCMinutes |
Sets the minute for the specified Date object in universal time and returns the new time in milliseconds. |
|
|
setUTCMonth |
Sets the month, and optionally the day, for the specified Date object in universal time and returns the new time in milliseconds. |
|
|
setUTCSeconds |
Sets the seconds for the specified Date object in universal time and returns the new time in milliseconds. |
|
|
Sets the year for the specified Date object in local time and returns the new time in milliseconds. |
|
|
|
Returns a string value for the specified date object in a readable format. |
|
|
|
UTC |
Returns the number of milliseconds between midnight on January 1, 1970, universal time, and the time specified in the parameters. |
|
|
Returns the number of milliseconds since midnight January 1, 1970, universal time, for this |
Methods inherited from class Object
Flash CS3