public final class JulianDay extends Object implements Serializable
The Julian day is the Julian day number for the preceding noon plus the fraction of the day (counting 86400 seconds) since that instant.
A Julian day number is defined as continuous
number associated with the solar day and is zero at Greenwich mean noon on 1st of January 4713 BC.
Important: Julian days are mainly used by astronomers and have nothing to do with
the Julian calendar. See also the authoritative
definition of IAU.
Note: The range of this class is limited to the year range of roughly -2000/+3000 because the precision will strongly decrease beyond those limits.
| Modifier and Type | Field and Description |
|---|---|
static double |
MAX
The maximum value which corresponds roughly to the year
+3000. |
static double |
MIN
The minimum value which corresponds roughly to the year
-2000. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getCenturyJ2000()
Obtains the value of this Julian day as Julian century relative to the year 2000.
|
double |
getMJD()
Obtains the value of this Julian day as Modified Julian Date
starting at midnight.
|
TimeScale |
getScale()
Obtains the underlying time scale.
|
double |
getValue()
Obtains the value of this Julian day starting at noon.
|
int |
hashCode() |
JulianDay |
minusDays(double amount)
Subtracts an amount in decimal days from this Julian day.
|
JulianDay |
minusSeconds(double amount)
Subtracts an amount in decimal seconds from this Julian day.
|
static JulianDay |
ofEphemerisTime(CalendarDate date,
PlainTime time,
ZonalOffset offset)
Creates a Julian day on the time scale
TimeScale.TT,
sometimes also called Julian Ephemeris Day. |
static JulianDay |
ofEphemerisTime(double value)
Creates a Julian day on the time scale
TimeScale.TT,
sometimes also called Julian Ephemeris Day. |
static JulianDay |
ofEphemerisTime(Moment moment)
Creates a Julian day on the time scale
TimeScale.TT,
sometimes also called Julian Ephemeris Day. |
static JulianDay |
ofMeanSolarTime(double value)
Creates a Julian day on the time scale
TimeScale.UT,
hence related to the mean solar time. |
static JulianDay |
ofMeanSolarTime(Moment moment)
Creates a Julian day on the time scale
TimeScale.UT,
hence related to the mean solar time. |
static JulianDay |
ofSimplifiedTime(double value)
Creates a Julian day on the time scale
TimeScale.POSIX. |
static JulianDay |
ofSimplifiedTime(Moment moment)
Creates a Julian day on the time scale
TimeScale.POSIX. |
JulianDay |
plusDays(double amount)
Adds an amount in decimal days to this Julian day.
|
JulianDay |
plusSeconds(double amount)
Adds an amount in decimal seconds to this Julian day.
|
Moment |
toMoment()
Converts this Julian day to a
Moment. |
String |
toString() |
public static final double MIN
-2000.public static final double MAX
+3000.public static JulianDay ofEphemerisTime(double value)
Creates a Julian day on the time scale TimeScale.TT,
sometimes also called Julian Ephemeris Day.
This kind of Julian day represents the actual astronomical standard. The time TT-2000-01-01T12:00Z corresponds to JD(TT)2451545.0
value - floating decimal value in range 990575.0 - 2817152.0IllegalArgumentException - if given value is not a finite number or out of rangepublic static JulianDay ofEphemerisTime(Moment moment)
Creates a Julian day on the time scale TimeScale.TT,
sometimes also called Julian Ephemeris Day.
This kind of Julian day represents the actual astronomical standard. The time TT-2000-01-01T12:00Z corresponds to JD(TT)2451545.0
moment - corresponding momentIllegalArgumentException - if the Julian day of moment is not in supported rangepublic static JulianDay ofEphemerisTime(CalendarDate date, PlainTime time, ZonalOffset offset)
Creates a Julian day on the time scale TimeScale.TT,
sometimes also called Julian Ephemeris Day.
This kind of Julian day represents the actual astronomical standard. The time TT-2000-01-01T12:00Z corresponds to JD(TT)2451545.0
date - calendar datetime - local timeoffset - timezone offsetIllegalArgumentException - if the Julian day of moment is not in supported rangepublic static JulianDay ofMeanSolarTime(double value)
Creates a Julian day on the time scale TimeScale.UT,
hence related to the mean solar time.
The conversion to the ephemeris time requires a delta-T-correction.
value - floating decimal value in range 990575.0 - 2817152.0IllegalArgumentException - if given value is not a finite number or out of rangepublic static JulianDay ofMeanSolarTime(Moment moment)
Creates a Julian day on the time scale TimeScale.UT,
hence related to the mean solar time.
The conversion to the ephemeris time requires a delta-T-correction.
moment - corresponding momentIllegalArgumentException - if the Julian day of moment is not in supported rangepublic static JulianDay ofSimplifiedTime(double value)
Creates a Julian day on the time scale TimeScale.POSIX.
This conversion does not involve a delta-T-correction.
value - floating decimal value in range 990575.0 - 2817152.0IllegalArgumentException - if given value is not a finite number or out of rangepublic static JulianDay ofSimplifiedTime(Moment moment)
Creates a Julian day on the time scale TimeScale.POSIX.
This conversion does not involve a delta-T-correction.
moment - corresponding momentIllegalArgumentException - if the Julian day of moment is not in supported rangepublic double getValue()
Obtains the value of this Julian day starting at noon.
public double getMJD()
Obtains the value of this Julian day as Modified Julian Date starting at midnight.
EpochDays.MODIFIED_JULIAN_DATEpublic double getCenturyJ2000()
Obtains the value of this Julian day as Julian century relative to the year 2000.
public TimeScale getScale()
Obtains the underlying time scale.
public JulianDay plusDays(double amount)
Adds an amount in decimal days to this Julian day.
amount - the amount in decimal dayspublic JulianDay minusDays(double amount)
Subtracts an amount in decimal days from this Julian day.
amount - the amount in decimal dayspublic JulianDay plusSeconds(double amount)
Adds an amount in decimal seconds to this Julian day.
amount - the amount in decimal secondspublic JulianDay minusSeconds(double amount)
Subtracts an amount in decimal seconds from this Julian day.
amount - the amount in decimal secondspublic Moment toMoment()
Converts this Julian day to a Moment.
Copyright © 2014–2021. All rights reserved.