|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgsfc.nssdc.cdf.util.CDFTT2000
public class CDFTT2000
Field Summary |
---|
Constructor Summary | |
---|---|
CDFTT2000()
|
Method Summary | |
---|---|
static long[] |
breakdown(long nanoSecSinceJ2000)
Breaks a TT2000 epoch value down into its full component parts. |
static long[] |
CDFgetLastDateinLeapSecondsTable()
This method returns the last date that a leap second was added in the leap second table used in the class. |
static double[][] |
CDFgetLeapSecondsTable()
This method returns the leap seconds table. |
static int |
CDFgetLeapSecondsTableStatus()
This method returns the status code reflecting whether the leap seconds are from a external file, defined by an environment variable, or the leap seconds are based on the hard-coded table in the class. |
static int |
CDFgetRowsinLeapSecondsTable()
This method returns the number of entries in the leap seconds table. |
static long |
compute(long year,
long month,
long day,
long hour,
long minute,
long second,
long msec,
long usec,
long nsec)
Computes a TT2000 epoch, nanoseconds since J2000, based on its date/time component parts. |
static java.lang.String |
encode(long nanoSecSinceJ2000)
Converts an epoch value in TT2000 form into a readable date/time string in ISO 8601 format. |
static java.lang.String |
encode(long nanoSecSinceJ2000,
int format)
Converts an epoch value in TT2000 form into a readable date/time string of chosen formats. |
static long |
fromGregorianTime(java.util.GregorianCalendar gc)
This method converts the date/time in a GregorianCalendar class object to TT2000 time. |
static long |
fromUTCEPOCH(double epoch)
Convert an epoch value in CDF_EPOCH to TT2000. |
static long |
fromUTCEPOCH16(double[] epoch)
Convert an epoch data in CDF_EPOCH16 to TT2000. |
static long |
fromUTCparts(double year,
double month,
double day)
Computes a TT2000 epoch, nanoseconds since J2000, based on its date/time component parts. |
static long |
fromUTCparts(double year,
double month,
double day,
double hour)
Computes a TT2000 epoch, nanoseconds since J2000, based on its date/time component parts. |
static long |
fromUTCparts(double year,
double month,
double day,
double hour,
double minute)
Computes a TT2000 epoch, nanoseconds since J2000, based on its date/time component parts. |
static long |
fromUTCparts(double year,
double month,
double day,
double hour,
double minute,
double second)
Computes a TT2000 epoch, nanoseconds since J2000, based on its date/time component parts. |
static long |
fromUTCparts(double year,
double month,
double day,
double hour,
double minute,
double second,
double milsec)
Computes a TT2000 epoch, nanoseconds since J2000, based on its date/time component parts. |
static long |
fromUTCparts(double year,
double month,
double day,
double hour,
double minute,
double second,
double milsec,
double micsec)
Computes a TT2000 epoch, nanoseconds since J2000, based on its date/time component parts. |
static long |
fromUTCparts(double year,
double month,
double day,
double hour,
double minute,
double second,
double msec,
double usec,
double nsec)
Computes a TT2000 epoch, nanoseconds since J2000, based on its date/time component parts. |
static long |
fromUTCstring(java.lang.String string)
This method parses an input date/time string and returns a TT2000 epoch value, nanoseconds since J2000. |
static long |
parse(java.lang.String string)
This method parses an input date/time string and returns a TT2000 epoch value, nanoseconds since J2000. |
static java.util.GregorianCalendar |
toGregorianTime(long tt2000)
This method converts the date/time in TT2000 to a GregorianCalendar class object. |
static double |
toUTCEPOCH(long nanoSecSinceJ2000)
Convert an epoch in TT2000 value to CDF_EPOCH value. |
static double |
toUTCEPOCH16(long nanoSecSinceJ2000,
double[] epoch)
Convert an epoch in TT2000 value to CDF_EPOCH16 value. |
static long[] |
toUTCparts(long nanoSecSinceJ2000)
Breaks a TT2000 epoch value down into its full component parts. |
static java.lang.String |
toUTCstring(long nanoSecSinceJ2000)
Converts an epoch value in TT2000 form into a readable date/time string of ISO 8601 formats. |
static java.lang.String |
toUTCstring(java.lang.Long nanoSecSinceJ2000)
Converts an epoch value in TT2000 form into a readable date/time string of ISO 8601 formats. |
static java.lang.String |
toUTCstring(long nanoSecSinceJ2000,
int format)
Converts an epoch value in TT2000 form into a readable date/time string of chosen formats. |
static java.lang.String |
toUTCstring(java.lang.Long nanoSecSinceJ2000,
int format)
Converts an epoch value in TT2000 form into a readable date/time string of chosen formats. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CDFTT2000()
Method Detail |
---|
public static long[] toUTCparts(long nanoSecSinceJ2000)
nanoSecSinceJ2000
- the epoch value, in nanoseconds since J2000,
to break down
Index | Part |
0 | year |
1 | month |
2 | day |
3 | hour |
4 | minute |
5 | second |
6 | millisecond |
7 | microsecond |
8 | nanosecond |
public static long[] breakdown(long nanoSecSinceJ2000)
nanoSecSinceJ2000
- the epoch value, in nanoseconds since J2000,
to break down
Index | Part |
0 | year |
1 | month |
2 | day |
3 | hour |
4 | minute |
5 | second |
6 | millisecond |
7 | microsecond |
8 | nanosecond |
public static long fromUTCparts(double year, double month, double day) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day in double
CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, a full day in doublehour
- the hour in double
CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour, double minute) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, a full day in doublehour
- the hour, a full hour in doubleminute
- the minute in double
CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour, double minute, double second) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, a full day in doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second in double
CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour, double minute, double second, double milsec) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, a full day in doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second, a full second in doublemsec
- the millisecond in double
CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour, double minute, double second, double milsec, double micsec) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, a full day in doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second, a full second in doublemsec
- the millisecond, a full millisecond in doubleusec
- the microsecond in double
CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long fromUTCparts(double year, double month, double day, double hour, double minute, double second, double msec, double usec, double nsec) throws CDFException
year
- the year, a full year in doublemonth
- the month, a full month in doubleday
- the day, a full day in doublehour
- the hour, a full hour in doubleminute
- the minute, a full minute in doublesecond
- the second, a full second in doublemsec
- the millisecond, a full millisecond in doubleusec
- the microsecond, a full microsecond in doublensec
- the nanosecond, a full nanosecond in double
CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long compute(long year, long month, long day, long hour, long minute, long second, long msec, long usec, long nsec) throws CDFException
year
- the year, a full year in longmonth
- the month, a full month in longday
- the day, a full day in longhour
- the hour, a full hour in longminute
- the minute, a full minute in longsecond
- the second, a full second in longmsec
- the millisecond, a full millisecond in longusec
- the microsecond, a full microsecond in longnsec
- the nanosecond, a full nanosecond in long
CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static double toUTCEPOCH(long nanoSecSinceJ2000) throws CDFException
nanoSecSinceJ2000
- the nanoseconds since J2000
CDFException
- an ILLEGAL_EPOCH_FIELD if an illegal
component value is detected.public static long fromUTCEPOCH(double epoch) throws CDFException
epoch
- the CDF_EPOCH value
CDFException
- an TT2000_TIME_ERROR if date is out of the
valid range for TT2000.public static double toUTCEPOCH16(long nanoSecSinceJ2000, double[] epoch) throws CDFException
nanoSecSinceJ2000
- the nanoseconds since J2000epoch
- the returned CDF_EPOCH16 value, a double[2] object
CDFException
- an ILLEGAL_EPOCH_FIELD if an illegal
component value is detected.public static long fromUTCEPOCH16(double[] epoch) throws CDFException
epoch
- the CDF_EPOCH16 value, a double[2] object
CDFException
- an TT2000_TIME_ERROR if date is out of the
valid range for TT2000.public static java.lang.String toUTCstring(java.lang.Long nanoSecSinceJ2000)
yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in Long object
public static java.lang.String toUTCstring(long nanoSecSinceJ2000)
yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999These formats are the same as those expected by fromUTCstring.
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in long
public static java.lang.String toUTCstring(java.lang.Long nanoSecSinceJ2000, int format)
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999 This is the default, ISO 8601, output.These formats are the same as those expected by fromUTCstring.
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in Long objectformat
- the format (from 0 to 3, as the default), an optional
public static java.lang.String toUTCstring(long nanoSecSinceJ2000, int format)
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999 This is the default, ISO 8601, output.These formats are the same as those expected by fromUTCstring.
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in longformat
- the format (from 0 to 3, as the default), an optional
public static java.lang.String encode(long nanoSecSinceJ2000)
yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in long
public static java.lang.String encode(long nanoSecSinceJ2000, int format)
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999 This is the default, ISO 8601, output.These formats are the same as those expected by fromUTCstring.
nanoSecSinceJ2000
- the TT2000 epoch value, nanoseconds since
J2000, in longformat
- the format (from 0 to 3, as the default), an optional
public static long fromUTCstring(java.lang.String string) throws CDFException
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999These formats are the same as those created by toUTCstring.
string
- the epoch in string representation
CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long parse(java.lang.String string) throws CDFException
Format:0 dd-mmm-yyyy hh:mm:ss.ccccccccc Examples: 01-Apr-1990 03:05:02.000000000 10-Oct-1993 23:45:49.777888999 Format:1 yyyymmdd.cccccccccc Examples: 19900401.1234567890 19931010.9998887776 Format:2 yyyymmddhhmmss Examples: 19900401030502 19931010234549 Format:3 yyyy-mm-ddThh:mm:ss.ccccccccc Examples: 1990-04-01T03:05:02.000000000 1993-10-10T23:45:49.777888999These formats are the same as those created by toUTCstring.
string
- the epoch in string representation
CDFException
- an TT2000_TIME_ERROR if an illegal
component value is detected.public static long[] CDFgetLastDateinLeapSecondsTable()
public static long fromGregorianTime(java.util.GregorianCalendar gc)
CDFException
- an TT2000_TIME_ERROR if a GregorianCalendar
component value is detected.public static java.util.GregorianCalendar toGregorianTime(long tt2000)
public static int CDFgetLeapSecondsTableStatus()
public static double[][] CDFgetLeapSecondsTable()
public static int CDFgetRowsinLeapSecondsTable()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |