Package org.onebusaway.utility
Class DateLibrary
- java.lang.Object
-
- org.onebusaway.utility.DateLibrary
-
-
Constructor Summary
Constructors Constructor Description DateLibrary()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DategetIso8601StringAsTime(String value)static DategetIso8601StringAsTime(String value, TimeZone timeZone)static DategetTimeAsDay(long t)static DategetTimeAsDay(Date t)static StringgetTimeAsIso8601String(Date date)static StringgetTimeAsIso8601String(Date date, TimeZone timeZone)static booleanhasAmPmClock(Locale locale)
-
-
-
Method Detail
-
getTimeAsIso8601String
public static String getTimeAsIso8601String(Date date)
- Parameters:
date- a target Date object- Returns:
- an ISO 8601 string representation of a Date
-
getTimeAsIso8601String
public static String getTimeAsIso8601String(Date date, TimeZone timeZone)
- Parameters:
date- a target Date objecttimeZone- the target timezone for the ISO 8601 representation- Returns:
- an ISO 8601 string representation of a Date
-
getIso8601StringAsTime
public static Date getIso8601StringAsTime(String value) throws ParseException
- Parameters:
value- an ISO 8601 string representation fo a Date- Returns:
- a parsed Date object
- Throws:
ParseException- if there is an error parsing the string
-
getIso8601StringAsTime
public static Date getIso8601StringAsTime(String value, TimeZone timeZone) throws ParseException
- Parameters:
value- an ISO 8601 string representation fo a DatetimeZone- the target timezone for the ISO 8601 representation- Returns:
- a parsed Date object
- Throws:
ParseException- if there is an error parsing the string
-
getTimeAsDay
public static Date getTimeAsDay(long t)
-
hasAmPmClock
public static boolean hasAmPmClock(Locale locale)
-
-