@Status(stage=PRODUCTION, unitTests=COMPLETE) @Review(by="Kees Schotanus", at="2009-09-28") public final class JulianDate extends Object
| Modifier and Type | Method and Description |
|---|---|
static GregorianCalendar |
getAsCalendar(int julianDay)
Converts the supplied Julian day to a LocalDate.
|
static LocalDate |
getAsLocalDate(int julianDay)
Converts the supplied Julian day to a LocalDate.
|
static int |
getJulianDay(int year,
int month,
int day)
Computes the Julian day from the supplied year, month and day.
|
static int |
getJulianDay(LocalDate localDate)
Computes the Julian day from the supplied localDate.
|
static int |
getJulianDay(long milliseconds)
/**
Converts the supplied time in milliseconds since the EPOCH to a Julian date.
|
public static int getJulianDay(LocalDate localDate)
localDate - The local date.NullPointerException - When the supplied localDate is null.IllegalArgumentException - When the supplied localDate contains an invalid date.public static int getJulianDay(int year,
int month,
int day)
year - Gregorian year.
month - Ordinal month number.
day - Ordinal day number.
IllegalArgumentException - When one of the input parameters is out of range.public static int getJulianDay(long milliseconds)
milliseconds - Time in milliseconds since the EPOCH.
public static LocalDate getAsLocalDate(int julianDay)
julianDay - The Julian day to convert.
IllegalArgumentException - When the input Julian day represents a day before Christ was born.public static GregorianCalendar getAsCalendar(int julianDay)
julianDay - The Julian day to convert.
IllegalArgumentException - When the input Julian day represents a day before Christ was born.Copyright © 2008–2018. All rights reserved.