Class TimeConverter
- java.lang.Object
-
- org.orekit.files.ccsds.definitions.TimeConverter
-
public class TimeConverter extends Object
Dates reader/writer.- Since:
- 11.0
- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description TimeConverter(TimeScale timeScale, AbsoluteDate referenceDate)
Build a time system.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DateTimeComponents
components(AbsoluteDate date)
Generate calendar components.AbsoluteDate
getReferenceDate()
Get the reference date for relative dates (may be null if no relative dates are used).TimeScale
getTimeScale()
Get the base time scale.double
offset(AbsoluteDate date)
Generate relative offset.AbsoluteDate
parse(String s)
Parse a relative or absolute date.
-
-
-
Constructor Detail
-
TimeConverter
public TimeConverter(TimeScale timeScale, AbsoluteDate referenceDate)
Build a time system.- Parameters:
timeScale
- base time scalereferenceDate
- reference date for relative dates (may be null if no relative dates are used)
-
-
Method Detail
-
parse
public AbsoluteDate parse(String s)
Parse a relative or absolute date.- Parameters:
s
- string to parse- Returns:
- parsed date
-
components
public DateTimeComponents components(AbsoluteDate date)
Generate calendar components.- Parameters:
date
- date to convert- Returns:
- date components
-
offset
public double offset(AbsoluteDate date)
Generate relative offset.- Parameters:
date
- date to convert- Returns:
- relative offset
-
getTimeScale
public TimeScale getTimeScale()
Get the base time scale.- Returns:
- base time scale
-
getReferenceDate
public AbsoluteDate getReferenceDate()
Get the reference date for relative dates (may be null if no relative dates are used).- Returns:
- reference date for relative dates (may be null if no relative dates are used)
- Since:
- 12.0
-
-