How can I return the Islamic calendar using java.util.Calendar?

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

+6
source share
2 answers

There is no built-in API in the API.

You will need to subclass the Calendar class to do this, or you could look at things that people have already written, and if that suits you.

IBM has one implementation of the Hijri calendar.

There is also an approximate provided by Joda-Time.

+10
source

I think the JDK does not come with the implementation of the Islamic calendar. You will need to use another library, such as Joda Time .

+4
source

Source: https://habr.com/ru/post/894429/


All Articles