Flash 8 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
|
Signature |
Description |
|---|---|
|
Date |
Constructs a new Date object that holds the specified date and time. |
|
Modifiers |
Signature |
Description |
|---|---|---|
|
|
getDate |
Returns the day of the month (an integer from 1 to 31) of the specified Date object according to local time. |
|
|
getDay |
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. |
|
|
getHours |
Returns the hour (an integer from 0 to 23) of the specified Date object, according to local time. |
|
|
getMilliseconds |
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. |
|
|
getMonth |
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. |
|
|
getTime |
Returns the number of milliseconds since midnight January 1, 1970, universal time, for the specified Date object. |
|
|
getTimezoneOffset |
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. |
|
|
getUTCDay |
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. |
|
|
getUTCMilliseconds |
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 |
|
|
getYear |
Returns the year of the specified Date object, according to local time. |
|
|
setDate |
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. |
|
|
setHours |
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. |
|
|
setMonth |
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. |
|
|
setTime |
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. |
|
|
setYear |
Sets the year for the specified Date object in local time and returns the new time in milliseconds. |
|
|
toString |
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. |
|
|
valueOf |
Returns the number of milliseconds since midnight January 1, 1970, universal time, for this |
Methods inherited from class Object addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00002128.html
Comments
orangechicken said on Mar 23, 2006 at 4:47 PM : graphXdziner said on Jun 14, 2006 at 9:32 AM : No screen name said on Apr 20, 2007 at 11:55 AM :