Package htsjdk.samtools.util
Class DateParser
- java.lang.Object
-
- htsjdk.samtools.util.DateParser
-
public class DateParser extends Object
NOTE: This code has been taken from w3.org, and modified slightly to handle timezones of the form [-+]DDDD, and also to fix a bug in the application of time zone to the parsed date. Date parser for ISO 8601 format http://www.w3.org/TR/1998/NOTE-datetime-19980827
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DateParser.InvalidDateException
-
Constructor Summary
Constructors Constructor Description DateParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getIsoDate(Date date)
Generate a ISO 8601 datestatic Date
parse(String isodate)
Parse the given string in ISO 8601 format and build a Date object.
-
-
-
Method Detail
-
parse
public static Date parse(String isodate) throws DateParser.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:
DateParser.InvalidDateException
- if the date is not valid
-
-