Package uk.ac.starlink.pal
Class mjDate
java.lang.Object
uk.ac.starlink.pal.mjDate
Modified Julian Date
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getDay()
Get dayint
Get day in yeardouble
Get fractionint
getFraction
(int n) Get fraction as integer number of places.int
getMonth()
Get monthint
getYear()
Get yeartoString()
return date as stringtoString
(int n) return date as string to required precision
-
Constructor Details
-
Method Details
-
getYear
public int getYear()Get year- Returns:
- Year
-
getMonth
public int getMonth()Get month- Returns:
- Month
-
getDay
public int getDay()Get day- Returns:
- Day
-
getFraction
public int getFraction(int n) Get fraction as integer number of places.- Returns:
- fraction * 10^n
-
getFraction
public double getFraction()Get fraction- Returns:
- Fraction of day
-
getDayinYear
public int getDayinYear()Get day in year- Returns:
- Day in year
-
toString
return date as string to required precision- Parameters:
n
- Number of decimal places in fraction- Returns:
- Date in form YYYY MM DD.F
-
toString
return date as string
-