Package de.dlr.proseo.model.util
Klasse OrbitTimeFormatter
java.lang.Object
de.dlr.proseo.model.util.OrbitTimeFormatter
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 -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic String
format
(TemporalAccessor instant) Format a timestamp object in orbit time formatstatic TemporalAccessor
Parse a timestamp string in orbit time formatstatic Instant
parseDateTime
(String dateTime) 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.
-
Konstruktordetails
-
OrbitTimeFormatter
public OrbitTimeFormatter()
-
-
Methodendetails
-
format
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
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
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
- 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 aboveDateTimeParseException
-