at.gv.egovernment.moa.util
Class DateTimeUtils

java.lang.Object
  |
  +--at.gv.egovernment.moa.util.DateTimeUtils

public class DateTimeUtils
extends Object

Utility for parsing and building XML type dateTime, according to ISO 8601.

Version:
$Id$
Author:
Patrick Peck
See Also:
http://www.w3.org/2001/XMLSchema-datatypes"

Constructor Summary
DateTimeUtils()
           
 
Method Summary
static String buildDateTime(Calendar cal)
          Builds a dateTime value from a Calendar value.
static Date parseDateTime(String dateTime)
          Parse a String containing a date and time instant, given in ISO 8601 format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeUtils

public DateTimeUtils()
Method Detail

buildDateTime

public static String buildDateTime(Calendar cal)
Builds a dateTime value from a Calendar value.
Parameters:
cal - the Calendar value
Returns:
the dateTime value

parseDateTime

public static Date parseDateTime(String dateTime)
                          throws ParseException
Parse a String containing a date and time instant, given in ISO 8601 format.
Parameters:
dateTime - The String to parse.
Returns:
The Date representation of the contents of dateTime.
Throws:
ParseException - Parsing the dateTime failed.