Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Class that contains static utility methods for manipulating and working
with Dates.
public static function compareDates(d1:Date, d2:Date):int
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Compares two dates and returns an integer depending on their relationship.
Returns -1 if d1 is greater than d2.
Returns 1 if d2 is greater than d1.
Returns 0 if both dates are equal.
Parameters
| d1:Date — The date that will be compared to the second date.
|
|
| d2:Date — The date that will be compared to the first date.
|
Returns | int — An int indicating how the two dates compare.
|
public static function getAMPM(d:Date):String
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns a string indicating whether the date represents a time in the
ante meridiem (AM) or post meridiem (PM).
If the hour is less than 12 then "AM" will be returned.
If the hour is greater than 12 then "PM" will be returned.
Parameters
| d:Date — The Date from which to generate the 12 hour clock indicator.
|
Returns | String — A String ("AM" or "PM") indicating which half of the day the
hour represents.
|
public static function getFullDayIndex(d:String):int
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns the index of the day that the full day name string
represents.
Parameters
| d:String — A full day name.
|
Returns | int — A int that represents that full day represented by the specifed
full month name.
|
See also
FULL_DAY
public static function getFullDayName(d:Date):String
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns the English full day name for the day that
the Date represents.
Parameters
| d:Date — The Date instance whose day will be used to retrieve the
full day name.
|
Returns | String — An English full day name.
|
See also
FULL_DAY
public static function getFullMonthIndex(m:String):int
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns the index of the month that the full month name string
represents.
Parameters
| m:String — A full month name.
|
Returns | int — A int that represents that month represented by the specifed
full month name.
|
See also
FULL_MONTH
public static function getFullMonthName(d:Date):String
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns the English full Month name for the Month that
the Date represents.
Parameters
| d:Date — The Date instance whose month will be used to retrieve the
full month name.
|
Returns | String — An English full month name.
|
See also
FULL_MONTH
public static function getShortDayIndex(d:String):int
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns the index of the day that the short day name string
represents.
Parameters
| d:String — A short day name.
|
Returns | int — A int that represents that short day represented by the specifed
full month name.
|
See also
SHORT_DAY
public static function getShortDayName(d:Date):String
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns the English Short Day name (3 letters) for the day that
the Date represents.
Parameters
| d:Date — The Date instance whose day will be used to retrieve the
short day name.
|
Returns | String — An English 3 Letter day abbreviation.
|
See also
SHORT_DAY
public static function getShortHour(d:Date):int
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns a short hour (0 - 12) represented by the specified date.
If the hour is less than 12 (0 - 11 AM) then the hour will be returned.
If the hour is greater than 12 (12 - 23 PM) then the hour minus 12
will be returned.
Parameters
| d:Date — The Date from which to generate the short hour
|
Returns | int — An int between 0 and 13 ( 1 - 12 ) representing the short hour.
|
public static function getShortMonthIndex(m:String):int
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns the index of the month that the short month name string
represents.
Parameters
| m:String — The 3 letter abbreviation representing a short month name.
|
Returns | int — A int that represents that month represented by the specifed
short name.
|
See also
SHORT_MONTH
public static function getShortMonthName(d:Date):String
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns the English Short Month name (3 letters) for the Month that
the Date represents.
Parameters
| d:Date — The Date instance whose month will be used to retrieve the
short month name.
|
Returns | String — An English 3 Letter Month abbreviation.
|
See also
SHORT_MONTH
public static function getShortYear(d:Date):String
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns a two digit representation of the year represented by the
specified date.
Parameters
| d:Date — The Date instance whose year will be used to generate a two
digit string representation of the year.
|
Returns | String — A string that contains a 2 digit representation of the year.
Single digits will be padded with 0.
|
public static function getUTCDate(d:Date):Date
Sort of converts a date into UTC.
Parameters
Returns public static function makeMorning(d:Date):Date
Converts a date into just after midnight.
Parameters
Returns public static function makeNight(d:Date):Date
Converts a date into just befor midnight.
Parameters
Returns public static function parseRFC822(str:String):Date
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Parses dates that conform to RFC822 into Date objects. This method also
supports four-digit years (not supported in RFC822), but two-digit years
(referring to the 20th century) are fine, too.
This function is useful for parsing RSS .91, .92, and 2.0 dates.
Parameters
ReturnsSee also
public static function parseW3CDTF(str:String):Date
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Parses dates that conform to the W3C Date-time Format into Date objects.
This function is useful for parsing RSS 1.0 and Atom 1.0 dates.
Parameters
ReturnsSee also
public static function toRFC822(d:Date):String
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns a date string formatted according to RFC822.
Parameters
ReturnsSee also
public static function toW3CDTF(d:Date, includeMilliseconds:Boolean = false):String
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9.0 |
Returns a date string formatted according to W3CDTF.
Parameters
| d:Date — d
|
|
| includeMilliseconds:Boolean (default = false ) — Determines whether to include the
milliseconds value (if any) in the formatted string.
|
ReturnsSee also
Mon Jan 16 2023, 03:32 PM +10:00