Thanks to Jean-Christophe Garnier for his assistance with this release.
Three methods have been added in this release.
public static boolean isParseable(String aCandidateDateTime)
The remaining two methods form a pair, and let you pass nanosecond values into and out of DateTime:
public static DateTime forInstantNanos(long aNanoseconds, TimeZone aTimeZone)
public long getNanosecondsInstant(TimeZone aTimeZone)
Thanks to Piero Campalani for his help with this item.
2012-05-24T02:03:04 2012-05-24T02:03:04.123456789This 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.
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.