|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjodd.datetime.JulianDateStamp
Julian Date stamp, for high precision calculations. Julian date is a real number and it basicly consist of two parts: integer and fraction. Integer part carries date information, fraction carries time information.
For calculations that will have time precision of 1e-3 seconds, both fraction and integer part must have enough numerics in it. The problem is that integer part is big and, on the other hand fractional is small, and since final julian date is a sum of this two values, some fraction numerals may be lost. Therefore, for higher precision both fractional and intger part of julian date real number has to be preserved.
TimeUtil
,
Serialized FormField Summary | |
double |
fraction
Fraction part of the Julian Date number. |
int |
integer
Integer part of the Julian Date number. |
Constructor Summary | |
JulianDateStamp()
Default constructor. |
|
JulianDateStamp(java.math.BigDecimal bd)
Creates JuliandDateStamp from BigDecimal . |
|
JulianDateStamp(double jd)
Creates JuliandDateStamp from a double . |
|
JulianDateStamp(int i,
double d)
Creates JuliandDateStamp from both integer and fractional part. |
Method Summary | |
double |
doubleValue()
Returns double value of julian date number. |
java.math.BigDecimal |
toBigDecimal()
Returns BigDecimal value of julian date number. |
java.lang.String |
toString()
Simple String conversion. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int integer
public double fraction
Constructor Detail |
public JulianDateStamp()
public JulianDateStamp(double jd)
double
.
jd
- julian datepublic JulianDateStamp(int i, double d)
i
- integer partd
- fractional partpublic JulianDateStamp(java.math.BigDecimal bd)
BigDecimal
.
bd
- julian dateMethod Detail |
public double doubleValue()
double
value of julian date number.
CAUTION: double values may not be suit for precision math.
public java.math.BigDecimal toBigDecimal()
BigDecimal
value of julian date number.
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |