ua.gradsoft.xwikisql.imported.jigsaw
Class DateParser

java.lang.Object
  extended by ua.gradsoft.xwikisql.imported.jigsaw.DateParser

public class DateParser
extends java.lang.Object

Date parser for ISO 8601 format http://www.w3.org/TR/1998/NOTE-datetime-19980827

Version:
$Revision: 1.5 $
Author:
Beno�t Mah� (bmahe@w3.org), Yves Lafon (ylafon@w3.org)

Constructor Summary
DateParser()
           
 
Method Summary
static java.lang.String getIsoDate(java.util.Date date)
          Generate a ISO 8601 date
static java.lang.String getIsoDateNoMillis(java.util.Date date)
          Generate a ISO 8601 date
static void main(java.lang.String[] args)
           
static java.util.Date parse(java.lang.String isodate)
          Parse the given string in ISO 8601 format and build a Date object.
static void test(java.util.Date date)
           
static void test(java.lang.String isodate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateParser

public DateParser()
Method Detail

parse

public static java.util.Date parse(java.lang.String isodate)
                            throws InvalidDateException
Parse the given string in ISO 8601 format and build a Date object.

Parameters:
isodate - the date in ISO 8601 format
Returns:
a Date instance
Throws:
InvalidDateException - if the date is not valid

getIsoDate

public static java.lang.String getIsoDate(java.util.Date date)
Generate a ISO 8601 date

Parameters:
date - a Date instance
Returns:
a string representing the date in the ISO 8601 format

getIsoDateNoMillis

public static java.lang.String getIsoDateNoMillis(java.util.Date date)
Generate a ISO 8601 date

Parameters:
date - a Date instance
Returns:
a string representing the date in the ISO 8601 format

test

public static void test(java.lang.String isodate)

test

public static void test(java.util.Date date)

main

public static void main(java.lang.String[] args)