![]() |
|
Version: 0.27 - Last update: 2004-05-30 | Home Page - SourceForge Project Page - Contact |
Jodd Overview News Download License References Development Using Jodd Javadoc JUnit report Community Contribute Report a bug More reading Milestone 0.30 ![]() ![]() |
JDateTimeJDateTime provides precise, functional and configurable date
and time manipulation. It has been designed to have all of the
functionalities of similar date/ti,e classes, but to be simpler to use,
and yet enhanced and fast as possible. JDateTime should
satisfy the most of date/time needs.JDateTime uses Astronomical Julian Date Numbers to store
date/time information as Julian Dates.
Precision of JDateTime is set to 1 millisecond.InitializationJDateTime can be initialized in many ways. Default
initialization sets the current date and time. Further, it may be set to a
specific date and/or time. Number of milliseconds since 1970 (e.g.
System.currentTimeMillis ) may also be used. Date and time of
JDateTime object can also be set by each field independently,
if there is a need for that. And at the end, JDateTime can be
initialized or set from instance of any available Java date/time class, as
well as from String , as it will be shown later.
Java time/date classesJDateTime , as said above, can be initialized from an object of any
available Java date/time class:
JDateTime can also act as a factory for above classes: it can return
a new instance of any of above classes. There is also a possibility to store
date/time values to an existing object of above classes.
Besides above default Java date/time classes, it is possible to add so-called 'converters' for any other custom date/time class. RollingJDateTime is very flexible and precise with adding date/time.
Values can be added for all date/time elements at once, or for one element
at time. Any value can be used for adding, both positive and negative.
JDateTime is aware of problem that may happens when adding
month and years, since months are not equally long. By default it is taken
care of this, however, this fixing can be turned off if need.
StringsOne of the power features ofJDateTime is a possibility to
set time from and to get time as a String . There is a default
date/time format, but it is also possible to specify custom format, both
globally or just for one method call. JdtFormater
implementations may be used for custom date/time string setting and
getting. Default formatter uses enhanced set of patterns defined by ISCO
8601 standard.
JDateTime provides an options to use day and month names and
abbreviations in any language. Jodd provides few languages itself.WeeksJDateTime provides various week definition, used for
calculating weeks of year or month.
|