Java Doc for JulianDateStamp.java in  » Development » jodd » jodd » datetime » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Development » jodd » jodd.datetime 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   jodd.datetime.JulianDateStamp

JulianDateStamp
public class JulianDateStamp implements java.io.Serializable,Cloneable(Code)
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.

The Julian day or Julian day number (JDN) is the (integer) number of days that have elapsed since Monday, January 1, 4713 BC in the proleptic Julian calendar 1. That day is counted as Julian day zero. Thus the multiples of 7 are Mondays. Negative values can also be used.

The Julian Date (JD) is the number of days (with decimal fraction of the day) that have elapsed since 12 noon Greenwich Mean Time (UT or TT) of that day. Rounding to the nearest integer gives the Julian day number. 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.
See Also:   TimeUtil
See Also:   JDateTime
See Also:   DateTimeStamp
See Also:   todo Add switches to MJD, TJD...



Field Summary
public  doublefraction
     Fraction part of the Julian Date (JD).
public  intinteger
     Integer part of the Julian Date (JD).

Constructor Summary
public  JulianDateStamp()
     Default empty constructor.
public  JulianDateStamp(double jd)
     Creates JD from a double.
public  JulianDateStamp(int i, double f)
     Creates JD from both integer and fractional part using normalization. Normalization occurs when fractional part is out of range.
public  JulianDateStamp(BigDecimal bd)
     Creates JD from BigDecimal.

Method Summary
public  JulianDateStampadd(JulianDateStamp jds)
     Adds a JD to current instance.
public  JulianDateStampadd(double delta)
     Adds a double to current instance.
protected  Objectclone()
    
public  doubledoubleValue()
     Returns double value of JD.
public  booleanequals(Object object)
    
public  intgetJulianDayNumber()
     Returns JDN.
public  inthashCode()
    
public  voidset(int i, double f)
     Sets integer and fractional part with normalization. Normalization means that if double is out of range, values will be correctly fixed.
public  JulianDateStampsub(JulianDateStamp jds)
     Subtracts a JD from current instance.
public  JulianDateStampsub(double delta)
     Subtracts a double from current instance.
public  BigDecimaltoBigDecimal()
     Returns BigDecimal value of JD.
public  StringtoString()
     Returns string representation of JD.

Field Detail
fraction
public double fraction(Code)
Fraction part of the Julian Date (JD). Should be always in [0.0, 1.0) range.



integer
public int integer(Code)
Integer part of the Julian Date (JD).




Constructor Detail
JulianDateStamp
public JulianDateStamp()(Code)
Default empty constructor.



JulianDateStamp
public JulianDateStamp(double jd)(Code)
Creates JD from a double.



JulianDateStamp
public JulianDateStamp(int i, double f)(Code)
Creates JD from both integer and fractional part using normalization. Normalization occurs when fractional part is out of range.
See Also:   JulianDateStamp.set(int,double)
Parameters:
  i - integer part
Parameters:
  f - fractional part should be in range [0.0, 1.0)



JulianDateStamp
public JulianDateStamp(BigDecimal bd)(Code)
Creates JD from BigDecimal.




Method Detail
add
public JulianDateStamp add(JulianDateStamp jds)(Code)
Adds a JD to current instance.



add
public JulianDateStamp add(double delta)(Code)
Adds a double to current instance.



clone
protected Object clone()(Code)



doubleValue
public double doubleValue()(Code)
Returns double value of JD. CAUTION: double values may not be suit for precision math due to loss of precission.



equals
public boolean equals(Object object)(Code)



getJulianDayNumber
public int getJulianDayNumber()(Code)
Returns JDN. Note that JDN is not equals to JulianDateStamp.integer . It is calculated by rounding to the nearest integer.



hashCode
public int hashCode()(Code)



set
public void set(int i, double f)(Code)
Sets integer and fractional part with normalization. Normalization means that if double is out of range, values will be correctly fixed.



sub
public JulianDateStamp sub(JulianDateStamp jds)(Code)
Subtracts a JD from current instance.



sub
public JulianDateStamp sub(double delta)(Code)
Subtracts a double from current instance.



toBigDecimal
public BigDecimal toBigDecimal()(Code)
Returns BigDecimal value of JD.



toString
public String toString()(Code)
Returns string representation of JD. julian integer as string



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.