Package org.aavso.tools.vstar.util.date
Class MeeusDateUtil
java.lang.Object
org.aavso.tools.vstar.util.date.AbstractDateUtil
org.aavso.tools.vstar.util.date.MeeusDateUtil
This class implements AbstractDateUtil methods using Jean Meeus's
Astronomical Algorithms 1991, 1st edition, chapter 7.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalendarToJD(int year, int month, double day) Method to convert the Julian Day corresponding to the specified year, month, and day.jdToCalendar(double jd) Method to convert the integer part of a JD into an ISO-8601 calendar date.jdToYMD(double jd) Method to convert the integer part of a JD into a calendar date.Methods inherited from class org.aavso.tools.vstar.util.date.AbstractDateUtil
getInstance, getMonthName
-
Constructor Details
-
MeeusDateUtil
public MeeusDateUtil()
-
-
Method Details
-
jdToCalendar
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:
jdToCalendarin classAbstractDateUtil- Parameters:
jd- Julian Day (double)- Returns:
- calendar date string of the form "YYYY-MM-DD" (ISO-8601 format)
- Throws:
IllegalArgumentException
-
jdToYMD
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:
jdToYMDin classAbstractDateUtil- Parameters:
jd- Julian Day (double)- Returns:
- structure of the form year, month, day
- Throws:
IllegalArgumentException
-
calendarToJD
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:
calendarToJDin classAbstractDateUtil- 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
-