Package gov.nasa.pds.tools.label
Class DateTimeFormatter
- java.lang.Object
-
- gov.nasa.pds.tools.label.DateTimeFormatter
-
public class DateTimeFormatter extends Object
Implements a parser for a PDS3 date/time string.- Version:
- $Revision$
- Author:
- pramirez, jagander, merose
-
-
Constructor Summary
Constructors Constructor Description DateTimeFormatter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Date
lenientParse(Label label, String dateTime, int lineNumber)
static Date
parse(Label label, String dateTime, int lineNumber)
Parses a date/time string into a JavaDate
.
-
-
-
Method Detail
-
parse
public static Date parse(Label label, String dateTime, int lineNumber) throws LabelParserException
Parses a date/time string into a JavaDate
. Throws error exceptions with respect to a designated label, if there are parse errors.- Parameters:
label
- the label in which the date/time string appearsdateTime
- the date/time string from the labellineNumber
- the line number within the label where the date/time string appears- Returns:
- the date corresponding to the date/time string
- Throws:
LabelParserException
- if there are any parse errors
-
lenientParse
public static Date lenientParse(Label label, String dateTime, int lineNumber) throws LabelParserException
- Throws:
LabelParserException
-
-