Class JulianDay
- All Implemented Interfaces:
- 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.
- Since:
- 3.33/4.28
- Author:
- Meno Hochschild
- See Also:
- Serialized Form
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionbooleandoubleObtains the value of this Julian day as Julian century relative to the year 2000.doublegetMJD()Obtains the value of this Julian day as Modified Julian Date starting at midnight.getScale()Obtains the underlying time scale.doublegetValue()Obtains the value of this Julian day starting at noon.inthashCode()minusDays(double amount)Subtracts an amount in decimal days from this Julian day.minusSeconds(double amount)Subtracts an amount in decimal seconds from this Julian day.static JulianDayofEphemerisTime(double value)Creates a Julian day on the time scaleTimeScale.TT, sometimes also called Julian Ephemeris Day.static JulianDayofEphemerisTime(CalendarDate date, PlainTime time, ZonalOffset offset)Creates a Julian day on the time scaleTimeScale.TT, sometimes also called Julian Ephemeris Day.static JulianDayofEphemerisTime(Moment moment)Creates a Julian day on the time scaleTimeScale.TT, sometimes also called Julian Ephemeris Day.static JulianDayofMeanSolarTime(double value)Creates a Julian day on the time scaleTimeScale.UT, hence related to the mean solar time.static JulianDayofMeanSolarTime(Moment moment)Creates a Julian day on the time scaleTimeScale.UT, hence related to the mean solar time.static JulianDayofSimplifiedTime(double value)Creates a Julian day on the time scaleTimeScale.POSIX.static JulianDayofSimplifiedTime(Moment moment)Creates a Julian day on the time scaleTimeScale.POSIX.plusDays(double amount)Adds an amount in decimal days to this Julian day.plusSeconds(double amount)Adds an amount in decimal seconds to this Julian day.toMoment()Converts this Julian day to aMoment.toString()
- 
Field Details- 
MINpublic static final double MINThe minimum value which corresponds roughly to the year-2000.- See Also:
- Constant Field Values
 
- 
MAXpublic static final double MAXThe maximum value which corresponds roughly to the year+3000.- See Also:
- Constant Field Values
 
 
- 
- 
Method Details- 
ofEphemerisTimeCreates 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 - Parameters:
- value- floating decimal value in range- 990575.0 - 2817152.0
- Returns:
- JulianDay
- Throws:
- IllegalArgumentException- if given value is not a finite number or out of range
 
- 
ofEphemerisTimeCreates 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 - Parameters:
- moment- corresponding moment
- Returns:
- JulianDay
- Throws:
- IllegalArgumentException- if the Julian day of moment is not in supported range
 
- 
ofEphemerisTimeCreates 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 - Parameters:
- date- calendar date
- time- local time
- offset- timezone offset
- Returns:
- JulianDay
- Throws:
- IllegalArgumentException- if the Julian day of moment is not in supported range
- Since:
- 3.36/4.31
 
- 
ofMeanSolarTimeCreates 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. - Parameters:
- value- floating decimal value in range- 990575.0 - 2817152.0
- Returns:
- JulianDay
- Throws:
- IllegalArgumentException- if given value is not a finite number or out of range
 
- 
ofMeanSolarTimeCreates 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. - Parameters:
- moment- corresponding moment
- Returns:
- JulianDay
- Throws:
- IllegalArgumentException- if the Julian day of moment is not in supported range
 
- 
ofSimplifiedTimeCreates a Julian day on the time scale TimeScale.POSIX.This conversion does not involve a delta-T-correction. - Parameters:
- value- floating decimal value in range- 990575.0 - 2817152.0
- Returns:
- JulianDay
- Throws:
- IllegalArgumentException- if given value is not a finite number or out of range
- Since:
- 3.34/4.29
 
- 
ofSimplifiedTimeCreates a Julian day on the time scale TimeScale.POSIX.This conversion does not involve a delta-T-correction. - Parameters:
- moment- corresponding moment
- Returns:
- JulianDay
- Throws:
- IllegalArgumentException- if the Julian day of moment is not in supported range
- Since:
- 3.34/4.29
 
- 
getValuepublic double getValue()Obtains the value of this Julian day starting at noon. - Returns:
- double
 
- 
getMJDpublic double getMJD()Obtains the value of this Julian day as Modified Julian Date starting at midnight. - Returns:
- double
- See Also:
- EpochDays.MODIFIED_JULIAN_DATE
 
- 
getCenturyJ2000public double getCenturyJ2000()Obtains the value of this Julian day as Julian century relative to the year 2000. - Returns:
- Julian century in J2000-frame
- Since:
- 3.36/4.31
 
- 
getScaleObtains the underlying time scale. - Returns:
- TimeScale
 
- 
plusDaysAdds an amount in decimal days to this Julian day. - Parameters:
- amount- the amount in decimal days
- Returns:
- new adjusted instance of Julian day with the same time scale
 
- 
minusDaysSubtracts an amount in decimal days from this Julian day. - Parameters:
- amount- the amount in decimal days
- Returns:
- new adjusted instance of Julian day with the same time scale
 
- 
plusSecondsAdds an amount in decimal seconds to this Julian day. - Parameters:
- amount- the amount in decimal seconds
- Returns:
- new adjusted instance of Julian day with the same time scale
 
- 
minusSecondsSubtracts an amount in decimal seconds from this Julian day. - Parameters:
- amount- the amount in decimal seconds
- Returns:
- new adjusted instance of Julian day with the same time scale
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
- 
toMomentConverts this Julian day to a Moment.- Returns:
- Moment
 
 
-