org.jclouds.date
Interface DateService

All Known Implementing Classes:
SimpleDateFormatDateService

public interface DateService

Parses and formats the ISO8601, C, and RFC822 date formats found in XML responses and HTTP response headers.

Author:
Adrian Cole, James Murty

Method Summary
 String cDateFormat()
           
 String cDateFormat(Date date)
           
 Date cDateParse(String toParse)
           
 String iso8601DateFormat()
           
 String iso8601DateFormat(Date date)
           
 Date iso8601DateParse(String toParse)
           
 String iso8601SecondsDateFormat()
           
 String iso8601SecondsDateFormat(Date dateTime)
           
 Date iso8601SecondsDateParse(String toParse)
           
 String rfc1123DateFormat()
           
 String rfc1123DateFormat(Date date)
           
 Date rfc1123DateParse(String toParse)
           
 String rfc822DateFormat()
           
 String rfc822DateFormat(Date date)
           
 Date rfc822DateParse(String toParse)
           
 

Method Detail

cDateFormat

String cDateFormat(Date date)

cDateFormat

String cDateFormat()

cDateParse

Date cDateParse(String toParse)
                throws IllegalArgumentException
Parameters:
toParse - text to parse
Returns:
parsed date
Throws:
IllegalArgumentException - if the input is invalid

rfc822DateFormat

String rfc822DateFormat(Date date)

rfc822DateFormat

String rfc822DateFormat()

rfc822DateParse

Date rfc822DateParse(String toParse)
                     throws IllegalArgumentException
Parameters:
toParse - text to parse
Returns:
parsed date
Throws:
IllegalArgumentException - if the input is invalid

iso8601SecondsDateFormat

String iso8601SecondsDateFormat(Date dateTime)

iso8601SecondsDateFormat

String iso8601SecondsDateFormat()

iso8601DateFormat

String iso8601DateFormat(Date date)

iso8601DateFormat

String iso8601DateFormat()

iso8601DateParse

Date iso8601DateParse(String toParse)
                      throws IllegalArgumentException
Parameters:
toParse - text to parse
Returns:
parsed date
Throws:
IllegalArgumentException - if the input is invalid

iso8601SecondsDateParse

Date iso8601SecondsDateParse(String toParse)
                             throws IllegalArgumentException
Parameters:
toParse - text to parse
Returns:
parsed date
Throws:
IllegalArgumentException - if the input is invalid

rfc1123DateFormat

String rfc1123DateFormat(Date date)

rfc1123DateFormat

String rfc1123DateFormat()

rfc1123DateParse

Date rfc1123DateParse(String toParse)
                      throws IllegalArgumentException
Parameters:
toParse - text to parse
Returns:
parsed date
Throws:
IllegalArgumentException - if the input is invalid


Copyright © 2009-2013 jclouds. All Rights Reserved.