Class JSOFA.JulianDate

  • All Implemented Interfaces:
    java.lang.Comparable<JSOFA.JulianDate>
    Enclosing class:
    JSOFA

    public static class JSOFA.JulianDate
    extends java.lang.Object
    implements java.lang.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.
    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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(JSOFA.JulianDate o)
      overrides @see java.lang.Comparable#compareTo(java.lang.Object)
      boolean equals​(java.lang.Object obj)
      overrides @see java.lang.Object#equals(java.lang.Object)
      int hashCode()
      overrides @see java.lang.Object#hashCode()
      java.lang.String toString()
      overrides @see java.lang.Object#toString()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • djm0

        public double djm0
        MJD zero-point
      • djm1

        public double djm1
        MJD offset
    • Constructor Detail

      • JulianDate

        public JulianDate​(double d1,
                          double d2)
    • Method Detail

      • compareTo

        public int compareTo​(JSOFA.JulianDate o)
        overrides @see java.lang.Comparable#compareTo(java.lang.Object)
        Specified by:
        compareTo in interface java.lang.Comparable<JSOFA.JulianDate>
      • hashCode

        public int hashCode()
        overrides @see java.lang.Object#hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        overrides @see java.lang.Object#equals(java.lang.Object)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        overrides @see java.lang.Object#toString()
        Overrides:
        toString in class java.lang.Object