Representing Dates in Other Epochs

Problem

You need to deal with dates in a form other than the Gregorian Calendar used in the western world.

Solution

Visit the IBM alphaWorks web site.

Discussion

As of Java 2, the only non-abstract Calendar subclass is the GregorianCalendar, as mentioned previously. However, others do exist. Check out the IBM alphaWorks web site (http://alphaworks.ibm.com), which has a large collection of freely available Java software (mostly without source code, alas). Search for “calendar”, and you’ll find a set of calendars -- Hebrew, Islamic, Buddhist, Japanese, and even an Astronomical Calendar class -- that covers most of the rest of the world.

These work in a similar fashion to the standard GregorianCalendar class, but have constants for month names and other information relevant to each particular calendar.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.17.128