public class DateParser extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DateParser.InvalidDateException |
Constructor and Description |
---|
DateParser() |
Modifier and Type | Method and Description |
---|---|
static String |
getIsoDate(Date date)
Generate a ISO 8601 date
|
static void |
main(String[] args) |
static Date |
parse(String isodate)
Parse the given string in ISO 8601 format and build a Date object.
|
static void |
test(Date date) |
static void |
test(String isodate) |
public static Date parse(String isodate) throws DateParser.InvalidDateException
isodate
- the date in ISO 8601 formatDateParser.InvalidDateException
- if the date is not validpublic static String getIsoDate(Date date)
date
- a Date instancepublic static void test(String isodate)
public static void test(Date date)
public static void main(String[] args)