com.amazonaws.util
Class DateUtils

java.lang.Object
  extended by com.amazonaws.util.DateUtils

@ThreadSafe
public class DateUtils
extends Object

Utilities for parsing and formatting dates.


Field Summary
protected static org.joda.time.format.DateTimeFormatter alternateIso8601DateFormat
          Alternate ISO 8601 format without fractional seconds
protected static org.joda.time.format.DateTimeFormatter compressedIso8601DateFormat
          This is another ISO 8601 format that's used in clock skew error response
protected static org.joda.time.format.DateTimeFormatter iso8601DateFormat
          ISO 8601 format
protected static org.joda.time.format.DateTimeFormatter rfc822DateFormat
          RFC 822 format
 
Constructor Summary
DateUtils()
           
 
Method Summary
 String formatIso8601Date(Date date)
          Deprecated. by the more efficient static method formatISO8601Date(Date)
static String formatISO8601Date(Date date)
          Formats the specified date as an ISO 8601 string.
 String formatRfc822Date(Date date)
          Deprecated. by the more efficient static method formatRFC822Date(Date)
static String formatRFC822Date(Date date)
          Formats the specified date as an RFC 822 string.
 Date parseCompressedIso8601Date(String dateString)
          Deprecated. by the more efficient static method parseCompressedISO8601Date(String)
static Date parseCompressedISO8601Date(String dateString)
          Parses the specified date string as a compressedIso8601DateFormat ("yyyyMMdd'T'HHmmss'Z'") and returns the Date object.
 Date parseIso8601Date(String dateString)
          Deprecated. by the more efficient static method parseISO8601Date(String)
static Date parseISO8601Date(String dateString)
          Parses the specified date string as an ISO 8601 date and returns the Date object.
 Date parseRfc822Date(String dateString)
          Deprecated. by the more efficient static method parseRFC822Date(String)
static Date parseRFC822Date(String dateString)
          Parses the specified date string as an RFC 822 date and returns the Date object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iso8601DateFormat

protected static final org.joda.time.format.DateTimeFormatter iso8601DateFormat
ISO 8601 format


alternateIso8601DateFormat

protected static final org.joda.time.format.DateTimeFormatter alternateIso8601DateFormat
Alternate ISO 8601 format without fractional seconds


rfc822DateFormat

protected static final org.joda.time.format.DateTimeFormatter rfc822DateFormat
RFC 822 format


compressedIso8601DateFormat

protected static final org.joda.time.format.DateTimeFormatter compressedIso8601DateFormat
This is another ISO 8601 format that's used in clock skew error response

Constructor Detail

DateUtils

public DateUtils()
Method Detail

parseIso8601Date

@Deprecated
public Date parseIso8601Date(String dateString)
Deprecated. by the more efficient static method parseISO8601Date(String)


parseISO8601Date

public static Date parseISO8601Date(String dateString)
Parses the specified date string as an ISO 8601 date and returns the Date object.

Parameters:
dateString - The date string to parse.
Returns:
The parsed Date object.

formatIso8601Date

@Deprecated
public String formatIso8601Date(Date date)
Deprecated. by the more efficient static method formatISO8601Date(Date)


formatISO8601Date

public static String formatISO8601Date(Date date)
Formats the specified date as an ISO 8601 string.

Parameters:
date - The date to format.
Returns:
The ISO 8601 string representing the specified date.

parseRfc822Date

@Deprecated
public Date parseRfc822Date(String dateString)
Deprecated. by the more efficient static method parseRFC822Date(String)


parseRFC822Date

public static Date parseRFC822Date(String dateString)
Parses the specified date string as an RFC 822 date and returns the Date object.

Parameters:
dateString - The date string to parse.
Returns:
The parsed Date object.

formatRfc822Date

@Deprecated
public String formatRfc822Date(Date date)
Deprecated. by the more efficient static method formatRFC822Date(Date)


formatRFC822Date

public static String formatRFC822Date(Date date)
Formats the specified date as an RFC 822 string.

Parameters:
date - The date to format.
Returns:
The RFC 822 string representing the specified date.

parseCompressedIso8601Date

@Deprecated
public Date parseCompressedIso8601Date(String dateString)
Deprecated. by the more efficient static method parseCompressedISO8601Date(String)


parseCompressedISO8601Date

public static Date parseCompressedISO8601Date(String dateString)
Parses the specified date string as a compressedIso8601DateFormat ("yyyyMMdd'T'HHmmss'Z'") and returns the Date object.

Parameters:
dateString - The date string to parse.
Returns:
The parsed Date object.


Copyright © 2016. All rights reserved.