There are three options that I see for date processing in Java, but maybe I will show you some better alternatives.
- java.util.Date is good, but it is a very simple class with many design flaws.
- java.util.Calendar - which is slightly better, but still really clumbsy to work with
- JODA time - what is better to work with, but I'm not sure how much it will persist using JPA2
I would like to use JODA Time, because these are promises a simpler API, but persistence is more important, so I would be well versed in Calendar or Date if JODA Time is not saved.
Ultimately, I need something that is stored in the database as a date, preferably with an easy-to-use API.
source
share