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: 8410 $
- Author:
- pramirez, jagander, merose
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateTimeFormatter
public DateTimeFormatter()
parse
public static Date parse(Label label,
String dateTime,
int lineNumber)
throws LabelParserException
- Parses a date/time string into a Java
Date
. 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
Copyright © 2005-2011 Planetary Data System. All Rights Reserved.