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 DateService
public final String cDateFormat()
cDateFormat
in interface DateService
public final Date cDateParse(String toParse)
cDateParse
in interface DateService
toParse
- text to parsepublic final String rfc822DateFormat(Date date)
rfc822DateFormat
in interface DateService
public final String rfc822DateFormat()
rfc822DateFormat
in interface DateService
public final Date rfc822DateParse(String toParse)
rfc822DateParse
in interface DateService
toParse
- text to parsepublic final String iso8601SecondsDateFormat()
iso8601SecondsDateFormat
in interface DateService
public final String iso8601DateFormat(Date date)
iso8601DateFormat
in interface DateService
public final String iso8601DateFormat()
iso8601DateFormat
in interface DateService
public final Date iso8601DateParse(String toParse)
iso8601DateParse
in interface DateService
toParse
- text to parsepublic final Date iso8601SecondsDateParse(String toParse) throws IllegalArgumentException
iso8601SecondsDateParse
in interface DateService
toParse
- text to parseIllegalArgumentException
- if the input is invalidpublic Date iso8601DateOrSecondsDateParse(String toParse) throws IllegalArgumentException
DateService
iso8601DateOrSecondsDateParse
in interface DateService
toParse
- The string to parse.IllegalArgumentException
public String iso8601SecondsDateFormat(Date date)
iso8601SecondsDateFormat
in interface DateService
public final String rfc1123DateFormat(Date date)
rfc1123DateFormat
in interface DateService
public final String rfc1123DateFormat()
rfc1123DateFormat
in interface DateService
public final Date rfc1123DateParse(String toParse) throws IllegalArgumentException
rfc1123DateParse
in interface DateService
toParse
- text to parseIllegalArgumentException
- if the input is invalidCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.