me.grison.jtoml
Class Util.ISO8601

java.lang.Object
  extended by me.grison.jtoml.Util.ISO8601
Enclosing class:
Util

public static class Util.ISO8601
extends Object

Helper class for handling ISO 8601 strings of the following format:

"2008-03-01T13:00:00+01:00". It also supports parsing the "Z" timezone.

Author: wrigiel

Taken from: http://stackoverflow.com/questions/2201925/converting-iso8601-compliant-string-to-java-util-date


Constructor Summary
Util.ISO8601()
           
 
Method Summary
static String fromCalendar(Calendar calendar)
          Transform Calendar to ISO 8601 string
static Calendar toCalendar(String iso8601string)
          Transform ISO 8601 string to Calendar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util.ISO8601

public Util.ISO8601()
Method Detail

toCalendar

public static Calendar toCalendar(String iso8601string)
                           throws ParseException
Transform ISO 8601 string to Calendar.

Throws:
ParseException

fromCalendar

public static String fromCalendar(Calendar calendar)
Transform Calendar to ISO 8601 string



Copyright © 2013. All Rights Reserved.