public class SimpleDateFormatDateService extends Object implements DateService
SimpleDateFormat internally.| Constructor and Description |
|---|
SimpleDateFormatDateService() |
| Modifier and Type | Method and Description |
|---|---|
String |
cDateFormat() |
String |
cDateFormat(Date date) |
Date |
cDateParse(String toParse) |
String |
iso8601DateFormat() |
String |
iso8601DateFormat(Date date) |
Date |
iso8601DateOrSecondsDateParse(String toParse)
Parse a given date in either of two iso8601 formats:
"yyyy-MM-dd'T'HH:mm:ssZ" or "yyyy-MM-dd'T'HH:mm:ss.SSSZ".
|
Date |
iso8601DateParse(String toParse) |
String |
iso8601SecondsDateFormat() |
String |
iso8601SecondsDateFormat(Date date) |
Date |
iso8601SecondsDateParse(String toParse) |
String |
rfc1123DateFormat() |
String |
rfc1123DateFormat(Date date) |
Date |
rfc1123DateParse(String toParse) |
String |
rfc822DateFormat() |
String |
rfc822DateFormat(Date date) |
Date |
rfc822DateParse(String toParse) |
public final String cDateFormat(Date date)
cDateFormat in interface DateServicepublic final String cDateFormat()
cDateFormat in interface DateServicepublic final Date cDateParse(String toParse)
cDateParse in interface DateServicetoParse - text to parsepublic final String rfc822DateFormat(Date date)
rfc822DateFormat in interface DateServicepublic final String rfc822DateFormat()
rfc822DateFormat in interface DateServicepublic final Date rfc822DateParse(String toParse)
rfc822DateParse in interface DateServicetoParse - text to parsepublic final String iso8601SecondsDateFormat()
iso8601SecondsDateFormat in interface DateServicepublic final String iso8601DateFormat(Date date)
iso8601DateFormat in interface DateServicepublic final String iso8601DateFormat()
iso8601DateFormat in interface DateServicepublic final Date iso8601DateParse(String toParse)
iso8601DateParse in interface DateServicetoParse - text to parsepublic final Date iso8601SecondsDateParse(String toParse) throws IllegalArgumentException
iso8601SecondsDateParse in interface DateServicetoParse - text to parseIllegalArgumentException - if the input is invalidpublic Date iso8601DateOrSecondsDateParse(String toParse) throws IllegalArgumentException
DateServiceiso8601DateOrSecondsDateParse in interface DateServicetoParse - The string to parse.IllegalArgumentExceptionpublic String iso8601SecondsDateFormat(Date date)
iso8601SecondsDateFormat in interface DateServicepublic final String rfc1123DateFormat(Date date)
rfc1123DateFormat in interface DateServicepublic final String rfc1123DateFormat()
rfc1123DateFormat in interface DateServicepublic final Date rfc1123DateParse(String toParse) throws IllegalArgumentException
rfc1123DateParse in interface DateServicetoParse - text to parseIllegalArgumentException - if the input is invalidCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.