| Package | com.adobe.utils |
| Class | public class DateUtil |
| Method | Defined by | ||
|---|---|---|---|
|
compareDates(d1:Date, d2:Date):int
[static]
Compares two dates and returns an integer depending on their relationship.
| DateUtil | ||
|
getAMPM(d:Date):String
[static]
Returns a string indicating whether the date represents a time in the
ante meridiem (AM) or post meridiem (PM).
| DateUtil | ||
|
getFullDayIndex(d:String):int
[static]
Returns the index of the day that the full day name string
represents.
| DateUtil | ||
|
getFullDayName(d:Date):String
[static]
Returns the English full day name for the day that
the Date represents.
| DateUtil | ||
|
getFullMonthIndex(m:String):int
[static]
Returns the index of the month that the full month name string
represents.
| DateUtil | ||
|
getFullMonthName(d:Date):String
[static]
Returns the English full Month name for the Month that
the Date represents.
| DateUtil | ||
|
getShortDayIndex(d:String):int
[static]
Returns the index of the day that the short day name string
represents.
| DateUtil | ||
|
getShortDayName(d:Date):String
[static]
Returns the English Short Day name (3 letters) for the day that
the Date represents.
| DateUtil | ||
|
getShortHour(d:Date):int
[static]
Returns a short hour (0 - 12) represented by the specified date.
| DateUtil | ||
|
getShortMonthIndex(m:String):int
[static]
Returns the index of the month that the short month name string
represents.
| DateUtil | ||
|
getShortMonthName(d:Date):String
[static]
Returns the English Short Month name (3 letters) for the Month that
the Date represents.
| DateUtil | ||
|
getShortYear(d:Date):String
[static]
Returns a two digit representation of the year represented by the
specified date.
| DateUtil | ||
|
getUTCDate(d:Date):Date
[static]
Sort of converts a date into UTC.
| DateUtil | ||
|
makeMorning(d:Date):Date
[static]
Converts a date into just after midnight.
| DateUtil | ||
|
makeNight(d:Date):Date
[static]
Converts a date into just befor midnight.
| DateUtil | ||
|
parseRFC822(str:String):Date
[static]
Parses dates that conform to RFC822 into Date objects.
| DateUtil | ||
|
parseW3CDTF(str:String):Date
[static]
Parses dates that conform to the W3C Date-time Format into Date objects.
| DateUtil | ||
|
toRFC822(d:Date):String
[static]
Returns a date string formatted according to RFC822.
| DateUtil | ||
|
toW3CDTF(d:Date, includeMilliseconds:Boolean = false):String
[static]
Returns a date string formatted according to W3CDTF.
| DateUtil | ||
| compareDates | () | method |
public static function compareDates(d1:Date, d2:Date):intCompares 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.
Parametersd1:Date — The date that will be compared to the second date.
|
|
d2:Date — The date that will be compared to the first date.
|
int — An int indicating how the two dates compare.
|
| getAMPM | () | method |
public static function getAMPM(d:Date):StringReturns 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.
Parametersd:Date — The Date from which to generate the 12 hour clock indicator.
|
String — A String ("AM" or "PM") indicating which half of the day the
hour represents.
|
| getFullDayIndex | () | method |
public static function getFullDayIndex(d:String):intReturns the index of the day that the full day name string represents.
Parametersd:String — A full day name.
|
int — A int that represents that full day represented by the specifed
full month name.
|
See also
| getFullDayName | () | method |
public static function getFullDayName(d:Date):StringReturns the English full day name for the day that the Date represents.
Parametersd:Date — The Date instance whose day will be used to retrieve the
full day name.
|
String — An English full day name.
|
See also
| getFullMonthIndex | () | method |
public static function getFullMonthIndex(m:String):intReturns the index of the month that the full month name string represents.
Parametersm:String — A full month name.
|
int — A int that represents that month represented by the specifed
full month name.
|
See also
| getFullMonthName | () | method |
public static function getFullMonthName(d:Date):StringReturns the English full Month name for the Month that the Date represents.
Parametersd:Date — The Date instance whose month will be used to retrieve the
full month name.
|
String — An English full month name.
|
See also
| getShortDayIndex | () | method |
public static function getShortDayIndex(d:String):intReturns the index of the day that the short day name string represents.
Parametersd:String — A short day name.
|
int — A int that represents that short day represented by the specifed
full month name.
|
See also
| getShortDayName | () | method |
public static function getShortDayName(d:Date):StringReturns the English Short Day name (3 letters) for the day that the Date represents.
Parametersd:Date — The Date instance whose day will be used to retrieve the
short day name.
|
String — An English 3 Letter day abbreviation.
|
See also
| getShortHour | () | method |
public static function getShortHour(d:Date):intReturns 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.
Parametersd:Date — The Date from which to generate the short hour
|
int — An int between 0 and 13 ( 1 - 12 ) representing the short hour.
|
| getShortMonthIndex | () | method |
public static function getShortMonthIndex(m:String):intReturns the index of the month that the short month name string represents.
Parametersm:String — The 3 letter abbreviation representing a short month name.
|
int — A int that represents that month represented by the specifed
short name.
|
See also
| getShortMonthName | () | method |
public static function getShortMonthName(d:Date):StringReturns the English Short Month name (3 letters) for the Month that the Date represents.
Parametersd:Date — The Date instance whose month will be used to retrieve the
short month name.
|
String — An English 3 Letter Month abbreviation.
|
See also
| getShortYear | () | method |
public static function getShortYear(d:Date):StringReturns a two digit representation of the year represented by the specified date.
Parametersd:Date — The Date instance whose year will be used to generate a two
digit string representation of the year.
|
String — A string that contains a 2 digit representation of the year.
Single digits will be padded with 0.
|
| getUTCDate | () | method |
public static function getUTCDate(d:Date):DateSort of converts a date into UTC.
Parametersd:Date |
Date |
| makeMorning | () | method |
public static function makeMorning(d:Date):DateConverts a date into just after midnight.
Parametersd:Date |
Date |
| makeNight | () | method |
public static function makeNight(d:Date):DateConverts a date into just befor midnight.
Parametersd:Date |
Date |
| parseRFC822 | () | method |
public static function parseRFC822(str:String):DateParses 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.
Parametersstr:String |
Date |
See also
| parseW3CDTF | () | method |
public static function parseW3CDTF(str:String):DateParses 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.
Parametersstr:String |
Date |
See also
| toRFC822 | () | method |
public static function toRFC822(d:Date):StringReturns a date string formatted according to RFC822.
Parametersd:Date |
String |
See also
| toW3CDTF | () | method |
public static function toW3CDTF(d:Date, includeMilliseconds:Boolean = false):StringReturns a date string formatted according to W3CDTF.
Parametersd:Date |
|
includeMilliseconds:Boolean (default = false) — Determines whether to include the
milliseconds value (if any) in the formatted string.
|
String |
See also