Klasse OrbitTimeFormatter

java.lang.Object
de.dlr.proseo.model.util.OrbitTimeFormatter

public class OrbitTimeFormatter extends Object
Master time format for orbit times (ISO-formatted UTC-STS timestamps with microsecond fraction and without time zone)
Autor:
Dr. Thomas Bassler
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    static String
    Format a timestamp object in orbit time format
    parse(String timestamp)
    Parse a timestamp string in orbit time format
    static Instant
    Parse a date and time string in the format "yyyy-MM-dd'T'HH:mm:ss.SSSSSS[zZX]", whereby all of the following variants are allowed: yyyy-MM-dd yyyy-MM-ddTHH:mm yyyy-MM-ddTHH:mm:ss yyyy-MM-ddTHH:mm:ss.S[SSSSS] any of the above plus a time zone in general, RFC 822 or ISO 8601 format Missing parts are set to zero, a missing time zone is set to UTC.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • OrbitTimeFormatter

      public OrbitTimeFormatter()
  • Methodendetails

    • format

      public static String format(TemporalAccessor instant) throws DateTimeException
      Format a timestamp object in orbit time format
      Parameter:
      instant - the timestamp to format
      Gibt zurück:
      a string with the formatted timestamp
      Löst aus:
      DateTimeException - if an error occurs during formatting
    • parse

      public static TemporalAccessor parse(String timestamp) throws DateTimeParseException
      Parse a timestamp string in orbit time format
      Parameter:
      timestamp - the timestamp string to parse
      Gibt zurück:
      a timestamp object representing the time
      Löst aus:
      DateTimeParseException - if unable to parse the requested result
      Siehe auch:
    • parseDateTime

      public static Instant parseDateTime(String dateTime) throws DateTimeParseException
      Parse a date and time string in the format "yyyy-MM-dd'T'HH:mm:ss.SSSSSS[zZX]", whereby all of the following variants are allowed:
      • yyyy-MM-dd
      • yyyy-MM-ddTHH:mm
      • yyyy-MM-ddTHH:mm:ss
      • yyyy-MM-ddTHH:mm:ss.S[SSSSS]
      • any of the above plus a time zone in general, RFC 822 or ISO 8601 format
      Missing parts are set to zero, a missing time zone is set to UTC.
      Parameter:
      dateTime - the date and time string to parse
      Gibt zurück:
      the parsed point in time
      Löst aus:
      DateTimeException - if the given string cannot be parsed according to the format given above
      DateTimeParseException