# Class JSOFA.JulianDate

java.lang.Object
org.jastronomy.jsofa.JSOFA.JulianDate

All Implemented Interfaces:
  `Comparable<JSOFA.JulianDate>`

Enclosing class:
  `JSOFA`

public static class JSOFA.JulianDate extends Object implements Comparable<JSOFA.JulianDate>
Julian Date representation. The actual date is djm0+djm1, apportioned in any convenient way between the two arguments. For example, JD(TT)=2450123.7 could be expressed in any of these ways, among others:

                djm0          djm1

             2450123.7           0.0       (JD method)
             2451545.0       -1421.3       (J2000 method)
             2400000.5       50123.2       (MJD method)
             2450123.5           0.2       (date &time method)

The JD method is the most natural and convenient to use in cases where the loss of several decimal digits of resolution is acceptable. The J2000 method is best matched to the way the argument is handled internally and will deliver the optimum resolution. The MJD method and the date &time methods are both good compromises between resolution and convenience.

Since:
  26 Jan 2010
Version:
  JSOFA Release 20180130
Author:
  Paul Harrison (paul.harrison@manchester.ac.uk) 28 Jan 2010

## Field Summary

Fields
Modifier and Type
Field
Description
`double`
`djm0`
MJD zero-point
`double`
`djm1`
MJD offset

## Constructor Summary

Constructors
Constructor
Description
`JulianDate(double d1, double d2)`

## Method Summary

Modifier and Type
Method
Description
`int`
`compareTo(JSOFA.JulianDate o)`
overrides @see java.lang.Comparable#compareTo(java.lang.Object)
`boolean`
`equals(Object obj)`
overrides @see java.lang.Object#equals(java.lang.Object)
`int`
`hashCode()`
overrides @see java.lang.Object#hashCode()
`String`
`toString()`
overrides @see java.lang.Object#toString()

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### djm0

public double djm0
MJD zero-point

### djm1

public double djm1
MJD offset

## Constructor Details

### JulianDate

public JulianDate(double d1, double d2)

## Method Details

### compareTo

public int compareTo(JSOFA.JulianDate o)
overrides @see java.lang.Comparable#compareTo(java.lang.Object)

Specified by:
  `compareTo` in interface `Comparable<JSOFA.JulianDate>`

### hashCode

public int hashCode()
overrides @see java.lang.Object#hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object obj)
overrides @see java.lang.Object#equals(java.lang.Object)

Overrides:
  `equals` in class `Object`

### toString

public String toString()
overrides @see java.lang.Object#toString()

Overrides:
  `toString` in class `Object`