Mohammad Faisal
Mohammad Faisal

Reputation: 5959

how could i return an Islamic calendar using java.util.Calendar?

I knew that java.util.Calendar class method getInstance() returns a GregorianCalendar but how could i get an Islamic calendar?

Upvotes: 6

Views: 5409

Answers (2)

Kal
Kal

Reputation: 24910

There's not one built in the API.

You're going to have to subclass the Calendar class to do this or you could look at stuff that people have already written and if that will be suitable for you.

IBM has one implementation of the Hijri calendar.

There's also an approximate one provided by Joda-Time.

Upvotes: 10

Thilo
Thilo

Reputation: 262764

I think the JDK does not ship with an implementation of the Islamic calendar. You'd have to use another library, such as Joda Time.

Upvotes: 4

Related Questions