public class EpochFormatter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
AD0_UNIX_MILLIS
0 A.D.
|
static boolean |
FAIL_ON_LEAP_ERROR
Configures behaviour when a date is encountered which is known to
have incorrectly applied leap seconds.
|
Constructor and Description |
---|
EpochFormatter()
Constructs a formatter without leap second awareness.
|
EpochFormatter(int leapSecondLastUpdated)
Constructs a formatter aware of the latest known leap second.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
formatEpoch(double epoch)
Formats a CDF EPOCH value as an ISO-8601 date.
|
java.lang.String |
formatEpoch16(double epoch1,
double epoch2)
Formats a CDF EPOCH16 value as an ISO-8601 date.
|
java.lang.String |
formatTimeTt2000(long timeTt2k)
Formats a CDF TIME_TT2000 value as an ISO-8601 date.
|
public static boolean FAIL_ON_LEAP_ERROR
public static final long AD0_UNIX_MILLIS
public EpochFormatter()
public EpochFormatter(int leapSecondLastUpdated)
leapSecondLastUpdated
- value of GDR LeapSecondLastUpdated
field (YYYYMMDD, or -1 for unused, or 0 for no leap seconds)public java.lang.String formatEpoch(double epoch)
epoch
- EPOCH valuepublic java.lang.String formatEpoch16(double epoch1, double epoch2)
epoch1
- first element of EPOCH16 pair (seconds since 0AD)epoch2
- second element of EPOCH16 pair (additional picoseconds)public java.lang.String formatTimeTt2000(long timeTt2k)
timeTt2k
- TIME_TT2000 value