|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.util.DateParser
public class DateParser
Date parser for ISO 8601 format http://www.w3.org/TR/1998/NOTE-datetime-19980827
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 |
---|
public DateParser()
Method Detail |
---|
public static java.util.Date parse(java.lang.String isodate) throws InvalidDateException
isodate
- the date in ISO 8601 format
InvalidDateException
- if the date is not validpublic static java.lang.String getIsoDate(java.util.Date date)
date
- a Date instance
public static java.lang.String getIsoDateNoMillis(java.util.Date date)
date
- a Date instance
public static void test(java.lang.String isodate)
public static void test(java.util.Date date)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |