Brian O'Neill wrote:

I just checked in some changes to LocalDate and LocalTime such that when constructing from a String, the correct parser is used. Before, it would always use the datetime parser, which is a bit wrong. LocalTime would require the time specification to always start with 'T', and it also accepted year-month-day values. If you passed in "10", it would think you meant year 10, which would then be dropped, producing a local time of "00:00:00".

Making this change to LocalDate and LocalTime is harmless, since they are new classes. Should we change YearMonthDay, TimeOfDay, and DateMidnight too? Would this be considered a bug fix or an incompatible change?

This change to the Local classes sounds good. The existing parser would not have been right.

I don't think we can change the existing classes though, except TimeOfDay. TimeOfDay should handle time formats without the T prefix, and favour those to date based formats.

The alternative to these changes would be to add static factory methods parse(String) to all the classes, and then they could be more explicit about what they support. Then the question is what to do with the string constructor.

Stephen



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to