Object | +--Date
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |
| Methods Summary | |
Object
|
diff(dateObj)
returns the difference between this and another date object in milliseconds |
Object
|
equals(date, extend)
checks if a date object equals another date object |
Object
|
format(format, locale, timezone)
format a Date to a string |
Object
|
getAge(param)
return the past timespan between this Date object and the current Date or a different Date object |
Object
|
getExpiry(param)
return the future timespan between this Date object and the current Date or a different Date object |
Object
|
getTimespan(param)
return the timespan to current date/time or a different Date object |
void
|
toLocalTime()
set the date/time to local time by adding the timezone offset |
void
|
toUtc()
set the date/time to UTC by subtracting the timezone offset |
| Method Detail |
Object diff(dateObj)
Object equals(date, extend)
Object - Date object to compare
Int - indicating how far the comparison should go
Object format(format, locale, timezone)
String - Format pattern
Object - Java Locale Object (optional)
Object - Java TimeZone Object (optional)
Object getAge(param)
Object getExpiry(param)
Object getTimespan(param)
Object - parameter object containing optional properties: .now = String to use if difference is < 1 minute .day|days = String to use for single|multiple day(s) .hour|hours = String to use for single|multiple hour(s) .minute|minutes = String to use for single|multiple minute(s) .date = Date object to use for calculating the timespan
void toLocalTime()
void toUtc()
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |