public class JulianDate
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static double |
B1950
Previously commonly used epoch for star charts, B1950.0, based on Besselian years.
|
static double |
J2000
Commonly used epoch for star charts, J2000.0, based on Julian years.
|
Constructor and Description |
---|
JulianDate()
Get the JD now (system time) - uses default locale so no time zone conversion should be needed.
|
JulianDate(java.util.Calendar dateTime)
Construct from a Java calendar object (which already includes locale and time zone).
|
JulianDate(double jd)
Construct from a numerical JD value.
|
JulianDate(long msSince1970)
Construct from the Java time in milliseconds since 1970.0 UT
|
JulianDate(java.lang.String xmlDateTime)
Construct from a xsd:DateTime value, as defined by W3C XML schema (eg, 2009-12-31T23:59:59.9+00:00).
|
JulianDate(javax.xml.datatype.XMLGregorianCalendar xmlCalendar)
Construct from standard Java representation of a W3C xs:dateTime.
|
Modifier and Type | Method and Description |
---|---|
JulianDate |
clone() |
static JulianDate |
createJulianDate(java.lang.String xmlDateTime)
Use this instead of constructor if the xmlDateTime may not be in W3C schema style.
|
boolean |
equals(java.lang.Object other) |
int |
hashCode()
Enables JulianDate objects to be used as hash keys.
|
double |
toDouble()
Get the numerical JD.
|
java.util.GregorianCalendar |
toGregorianCalendar() |
java.lang.String |
toImageTimestampFormat()
Get the date/time in the format yyyy:MM:dd HH:mm:ss
|
double |
toMeanSiderealTimeAtGreenwichInDegrees()
Uses method given in J.Meeus "Astronomical Algorithms" (2nd Edn) Chapter 12.
|
long |
toMsSince1970()
Convert to milliseconds since 1970.0 UT, as used in Java and other programming systems.
|
java.lang.String |
toString() |
java.lang.String |
toXmlDateTime()
Returns dateTime in W3C schema format.
|
public static final double J2000
public static final double B1950
public JulianDate(double jd)
public JulianDate(long msSince1970)
public JulianDate(java.util.Calendar dateTime)
public JulianDate()
public JulianDate(java.lang.String xmlDateTime) throws javax.xml.datatype.DatatypeConfigurationException
javax.xml.datatype.DatatypeConfigurationException
public JulianDate(javax.xml.datatype.XMLGregorianCalendar xmlCalendar)
public long toMsSince1970()
public java.util.GregorianCalendar toGregorianCalendar()
public static JulianDate createJulianDate(java.lang.String xmlDateTime)
public java.lang.String toString()
toString
in class java.lang.Object
public double toDouble()
public java.lang.String toImageTimestampFormat()
public java.lang.String toXmlDateTime()
public double toMeanSiderealTimeAtGreenwichInDegrees()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public JulianDate clone()
clone
in class java.lang.Object