Class MeeusDateUtil

java.lang.Object
org.aavso.tools.vstar.util.date.AbstractDateUtil
org.aavso.tools.vstar.util.date.MeeusDateUtil

public class MeeusDateUtil extends AbstractDateUtil
This class implements AbstractDateUtil methods using Jean Meeus's Astronomical Algorithms 1991, 1st edition, chapter 7.
  • Constructor Details

    • MeeusDateUtil

      public MeeusDateUtil()
  • Method Details

    • jdToCalendar

      public String jdToCalendar(double jd) throws IllegalArgumentException
      Method to convert the integer part of a JD into an ISO-8601 calendar date. This method determines the Calendar day given the Julian Day. It is not valid for negative Julian Days (but is valid for negative year results).
      Specified by:
      jdToCalendar in class AbstractDateUtil
      Parameters:
      jd - Julian Day (double)
      Returns:
      calendar date string of the form "YYYY-MM-DD" (ISO-8601 format)
      Throws:
      IllegalArgumentException
    • jdToYMD

      public YMD jdToYMD(double jd) throws IllegalArgumentException
      Method to convert the integer part of a JD into a calendar date. This method determines the Calendar day given the Julian Day. It is not valid for negative Julian Days (but is valid for negative year results).
      Specified by:
      jdToYMD in class AbstractDateUtil
      Parameters:
      jd - Julian Day (double)
      Returns:
      structure of the form year, month, day
      Throws:
      IllegalArgumentException
    • calendarToJD

      public double calendarToJD(int year, int month, double day) throws IllegalArgumentException
      Method to convert the Julian Day corresponding to the specified year, month, and day. The method determines the Julian Day for any year, including dates prior to the start of the Gregorian Calendar. It is not valid for negative Julian Day results (but is valid for negative years).
      Specified by:
      calendarToJD in class AbstractDateUtil
      Parameters:
      year - The year.
      month - The month (1..12).
      day - The day which may contain a fractional component.
      Returns:
      The Julian Day (double)
      Throws:
      IllegalArgumentException