org.springframework.extensions.surf.util
Class ISO8601DateFormat

java.lang.Object
  extended by org.springframework.extensions.surf.util.ISO8601DateFormat

public class ISO8601DateFormat
extends Object

Formatting support for ISO 8601 dates

    sYYYY-MM-DDThh:mm:ss.sssTZD
 
where:


Constructor Summary
ISO8601DateFormat()
           
 
Method Summary
static String format(Date isoDate)
          Format date into ISO format
static Date parse(String isoDate)
          Parse date from ISO formatted string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ISO8601DateFormat

public ISO8601DateFormat()
Method Detail

format

public static String format(Date isoDate)
Format date into ISO format

Parameters:
isoDate - the date to format
Returns:
the ISO formatted string

parse

public static Date parse(String isoDate)
Parse date from ISO formatted string

Parameters:
isoDate - ISO string to parse
Returns:
the date
Throws:
PlatformRuntimeException - if the parse failed


Copyright © 2009 SpringSource, Inc. All Rights Reserved.