for date and time handling It is an open-source software under ASF2* license It totally replaces the JDK Date and Calendar classes * http://www.apache.org/licenses/LICENSE-2.0)
with the JDK, so you don't need to replace all of your Java code, only the parts that do date/time calculations. Joda-Time makes time and date values easy to manage, manipulate, and understand. Ease of use, in fact, is Joda's primary design goal
- a JDK calendar String - in ISO8601 format Long - in milliseconds any Joda-Time datetime class This list is extensible. A little type-safety for extensibility. Takes Object!
the previous slide? // 2000.01.01, 00:00 (a.k.a “The Millennium bug”) Calendar calendar = Calendar.getInstance(); calendar.set(2000, Calendar.JANUARY, 1, 0, 0, 0); Using Joda-Time it would look pretty much like this: DateTime dateTime = new DateTime(2000, 1, 1, 0, 0, 0, 0);
40ms per format/parse Not thread-safe Using DateTimeFormatter – 4ms (10 times faster) Joda-Time .toString() uses DateTimeFormatter Speed Test Demo