DATE4J Version History

date4j.jar version 1.5.1 (Published November 19, 2013)

Bug fix for numSecondsFrom, which failed when only a time portion was being passed. Thanks to Jamie Craane for the bug report.

date4j.jar version 1.5.0 (Published May 18, 2013)

Some additions regarding nanoseconds, and explicit verification of Strings intended for the DateTime(String) constructor. This release is backwards-compatible.

Thanks to Jean-Christophe Garnier for his assistance with this release.

Three methods have been added in this release.

The above method lets you verify explicitly that text will be parseable by DateTime.

The remaining two methods form a pair, and let you pass nanosecond values into and out of DateTime:

date4j.jar version 1.4.0 (Published July 14, 2012)

There's a single change in this release. The plus and minus methods have been extended to include fractional seconds (nanoseconds). This change is not backwards compatible. (Sorry about that.) Existing code which calls these methods will need to add another parameter at the end. If you don't care about the nanoseconds, just pass a value of 0.

Thanks to Piero Campalani for his help with this item.

date4j.jar version 1.3.0 (Published May 24, 2012)

There's a single change in this release. The DateTime constructor that takes a String now also accepts a 'T' separating the date and the time, in addition to accepting a single space as a separator. Two examples of the new syntax:
This change is backwards-compatible. This change was added mainly for compatibility with the input type='datetime-local' defined by HTML5. It allows browser implementations to submit text of the above syntax.

date4j.jar version 1.2.0 (Published June 4, 2011)

There are two changes in this release. This release is not backwards compatible.

The format() methods have changed implementation. The style 'YYYYMMDD', for example, is now permitted. (This corrects an oversight.)

In addition, the text that can be passed to the format methods can now take a much wider range of values. For example, a valid format String is :

'Now: YYYY-MM-DD hh:mm:ss'
This text acts like a little template. The preamble 'Now :' is simply echoed, since it contains no formatting symbols.

Such free-form text will often need pairs of escape characters '|', to prevent h, m, s, a, f, and so on from being interpreted as formatting symbols. For example :

'|The date is:|  YYYY-MM-DD'

This method has been removed. Since the String passed to the format() methods has no restrictions, such a method no longer makes sense.

date4j.jar version 1.1.0 (Published April 13, 2011)

Sole change: the toString method now returns a better result.

date4j.jar version 1.0.0 (Published April 30, 2010)

This is the first version of date4j.