May 11, 2006

Resolved: Use Joda Time instead of JDK datetime classes

Maybe there's some gotcha lurking down the road, but I can see only one reason why I'd use JDK datetime classes vs. those in Joda Time. That reason is compatibility with third-party libraries -- Hibernate + JDBC, the JSTL fmt taglib, I/O, etc. Other than that, it seems superior in every way. Not only does the overall architecture make sense, but the components are understandable and have lots of useful convenience methods. (For instance, using datetime.toString( someFormat ) is very perlish.)

And it runs on JDK 1.3 and higher. Plus, the fact that the date formatter is threadsafe is almost enough for me to switch everything over ASAP. Maybe Sun can just add this wholesale to a JDK and make everyone's lives easier?

Next: I finished the MS 150
Previous: Spring cleaning: The need to be pure