Package htsjdk.samtools.util
Class DateParser
java.lang.Object
htsjdk.samtools.util.DateParser
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
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
DateParser
public DateParser()
-
-
Method Details
-
parse
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
-
getIsoDate
Generate a ISO 8601 date- Parameters:
date
- a Date instance- Returns:
- a string representing the date in the ISO 8601 format
-