I am looking for some subclasses of the Java calendar class, preferably a Hijri (Islamic) calendar implementation, but will potentially require more. Does anyone know of a library that is available for commercial use?
I have found IBM's ICU library (here), however, they do not extend java.util.Calendar
and instead have written their own class which also replies on the custom classes; UDate
and ULocale
. I am attempting to I18n an existing java application which already has over 400 usages of Calendar so I ideally want to stick to that class. Any suggestions?
Thanks in advance.
The Calendar class is an abstract class that provides methods for converting between a specific instant in time and a set of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR etc. Calendar provides a class method, getInstance which returns a Calendar object.
Clone method provides the copy of the current object. 6. The compareTo () method of Calendar class compares the time values (millisecond offsets) between two calendar object. 7. It fills any unset fields in the calendar fields. 8. It converts the current millisecond time value time to calendar field values in fields []. 9.
Sets the designated parameter to the given java.sql.Timevalue, using the given Calendarobject. void RowSet.setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
As usual with all Date API questions the answer is use Joda if possible, if not, make it possible.
I'd also be wary of IBM Date classes, they produced the current Java date API and while it's a big place, that implementation does not bode well for other offerings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With