Class DateTimeFormatter


  • public class DateTimeFormatter
    extends Object
    Implements a parser for a PDS3 date/time string.
    Version:
    $Revision$
    Author:
    pramirez, jagander, merose
    • Constructor Detail

      • DateTimeFormatter

        public DateTimeFormatter()
    • Method Detail

      • 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 appears
        dateTime - the date/time string from the label
        lineNumber - 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