As supplement to the answer of Ole, I enumerate here some variants of Hijri calendar and the validation results using my lib Time4J which offers more support for variants and also offers an extra static validation method:
So we can see that all algorithmic variants of Hijri calendar don't support your expectation but the diyanet and the umalqura variant. Probably you want the umalqura variant (the official calendar of Saudi-Arabia, but please clarify if you have more details about your expectations).
About your wish to solve your problem with Joda-Time, sorry, there is no chance to validate 1403-02-30 as valid because Joda-Time only supports four algorithmic variants (as subset of what Time4J supports). The same can be said for the Threeten-Backport which supports only "islamic-tbla" (or "islamic-civil" - here the API is not well documented). The java.time-package only supports one variant, too, but that variant (umalqura) matches your expectation. However, java.time does not run on Java 6.
There is also a backport called ThreetenABP for lower Android-versions. But be aware of the pitfall that its implementation of HijrahDate is different and does NOT use the calendar of Saudi-Arabia (so you have to tolerate differences in date conversion).
If you opt for that (rather outdated) library then you should choose the library version adapted for android. However, it does not support the calendar of Saudi-Arabia, too, but offers four different other variations. You would need to specify the algorithmic leap year pattern.
That is a library written by myself (as adaptation of Time4J for Android). It offers the class HijriCalendar with several variations including the Joda-variants but also including the calendar of Saudi-Arabia (variant ummalqura). It offers all needed features like date arithmetic (by plus()- or minus()-method), date comparison (by isAfter() etc.). Example:
I am not an expert on Islamic calendars or HijrahChronology, but I believe you can convert between a Hijrah date and a Gregorian (proleptic) date by calling the from method on HijrahDate and LocalDate classes.
The Islamic calendar system is a lunar calendar based on observation. The observation aspect of the calendar means that a new month can only be declared based on human observations of the moon, something which can obviously vary and is unsuited to computer calculation.
Joda-Time implements the arithmetic Islamic calendar, which is an approximation of the actual calendar. There are 12 months, each of 29 or 30 days, making a year of 354 days, or 355 in a leap year. The days in the month alternate, with the first month having 30 days, the second 29 days and so on. In a leap year, the twelfth month has 30 days instead of the normal 29.
A day in the Islamic calendar begins at sunset on the previous 'day'. Joda-Time does not model this, thus times and date rollover follow standard ISO definitions, in other words starting at midnight.
Within Joda-Time the Islamic calendar system can be used by obtaining an instance of IslamicChronology. This is normally created via the IslamicChronology.getInstance() factory. The chronology is then passed into the constructors of the main date and time classes.
The Hijri calendar (Arabic: ٱلتَّقْوِيم ٱلْهِجْرِيّ, romanized: al-taqwīm al-hijrī), also known in English as the Muslim calendar and Islamic calendar, is a lunar calendar consisting of 12 lunar months in a year of 354 or 355 days. It is used to determine the proper days of Islamic holidays and rituals, such as the annual fasting and the annual season for the great pilgrimage. In almost all countries where the predominant religion is Islam, the civil calendar is the Gregorian calendar, with Syriac month-names used in the Levant and Mesopotamia (Iraq, Syria, Jordan, Lebanon and Palestine) but the religious calendar is the Hijri one.
This calendar enumerates the Hijri era, whose epoch was established as the Islamic New Year in 622 CE.[1] During that year, Muhammad and his followers migrated from Mecca to Medina and established the first Muslim community (ummah), an event commemorated as the Hijrah. In the West, dates in this era are usually denoted AH (Latin: Anno Hegirae, "in the year of the Hijrah").[a] In Muslim countries, it is also sometimes denoted as H[2] from its Arabic form (سَنَة هِجْرِيَّة, abbreviated ھ). In English, years prior to the Hijra are denoted as BH ("Before the Hijra").[3]
For central Arabia, especially Mecca, there is a lack of epigraphical evidence but details are found in the writings of Muslim authors of the Abbasid era. Inscriptions of the ancient South Arabian calendars reveal the use of a number of local calendars. At least some of these South Arabian calendars followed the lunisolar system. Both al-Biruni and al-Mas'udi suggest that the ancient Arabs used the same month names as the Muslims, though they also record other month names used by the pre-Islamic Arabs.[6][which?]
Different interpretations of the concept of Nasī' have been proposed.[9] Some scholars, both Muslim[10][11] and Western,[6][7] maintain that the pre-Islamic calendar used in central Arabia was a purely lunar calendar similar to the modern Islamic calendar. According to this view, Nasī' is related to the pre-Islamic practices of the Meccan Arabs, where they would alter the distribution of the forbidden months within a given year without implying a calendar manipulation. This interpretation is supported by Arab historians and lexicographers, like Ibn Hisham, Ibn Manzur, and the corpus of Qur'anic exegesis.[12]
Others concur that it was originally a lunar calendar, but suggest that about 200 years before the Hijra it was transformed into a lunisolar calendar containing an intercalary month added from time to time to keep the pilgrimage within the season of the year when merchandise was most abundant. This interpretation was first proposed by the medieval Muslim astrologer and astronomer Abu Ma'shar al-Balkhi, and later by al-Biruni,[8][14] al-Mas'udi, and some western scholars.[15] This interpretation considers Nasī' to be a synonym to the Arabic word for "intercalation" (kabīsa). The Arabs, according to one explanation mentioned by Abu Ma'shar, learned of this type of intercalation from the Jews.[7][8][14] The Jewish Nasi was the official who decided when to intercalate the Jewish calendar.[16][full citation needed] Some sources say that the Arabs followed the Jewish practice and intercalated seven months over nineteen years, or else that they intercalated nine months over 24 years; there is, however, no consensus among scholars on this issue.[17][full citation needed]
The prohibition of Nasī' would presumably have been announced when the intercalated month had returned to its position just before the month of Nasi' began. If Nasī' meant intercalation, then the number and the position of the intercalary months between AH 1 and AH 10 are uncertain; western calendar dates commonly cited for key events in early Islam such as the Hijra, the Battle of Badr, the Battle of Uhud and the Battle of the Trench should be viewed with caution as they might be in error by one, two, three or even four lunar months. This prohibition was mentioned by Muhammad during the farewell sermon which was delivered on 9 Dhu al-Hijjah AH 10 (Julian date Friday 6 March 632 CE) on Mount Arafat during the farewell pilgrimage to Mecca.[citation needed]
The three successive sacred (forbidden) months mentioned by Prophet Muhammad (months in which battles are forbidden) are Dhu al-Qa'dah, Dhu al-Hijjah, and Muharram, months 11, 12, and 1 respectively. The single forbidden month is Rajab, month 7. These months were considered forbidden both within the new Islamic calendar and within the old pagan Meccan calendar.[20][6][21][22][23]
Each month of the Islamic calendar commences on the birth of the new lunar cycle.[24] Traditionally, this is based on actual observation of the moon's crescent (hilal) marking the end of the previous lunar cycle and hence the previous month, thereby beginning the new month. Consequently, each month can have 29 or 30 days depending on the visibility of the Moon, astronomical positioning of the Earth and weather conditions.[c]
F A Shamsi (1984) postulated that the Arabic calendar was never intercalated. According to him, the first day of the first month of the new fixed Islamic calendar (1 Muharram AH 1) was no different from what was observed at the time. The day the Prophet moved from Quba' to Medina was originally 26 Rabi' I on the pre-Islamic calendar.[30] 1 Muharram of the new fixed calendar corresponded to Friday, 16 July 622 CE, the equivalent civil tabular date (same daylight period) in the Julian calendar.[31][32] The Islamic day began at the preceding sunset on the evening of 15 July. This Julian date (16 July) was determined by medieval Muslim astronomers by projecting back in time their own tabular Islamic calendar, which had alternating 30- and 29-day months in each lunar year plus eleven leap days every 30 years. For example, al-Biruni mentioned this Julian date in the year 1000 CE.[33] Although not used by either medieval Muslim astronomers or modern scholars to determine the Islamic epoch, the thin crescent moon would have also first become visible (assuming clouds did not obscure it) shortly after the preceding sunset on the evening of 15 July, 1.5 days after the associated dark moon (astronomical new moon) on the morning of 14 July.[34]
Though Michael Cook and Patricia Crone in their book Hagarism cite a coin from AH 17, the first surviving attested use of a Hijri calendar date alongside a date in another calendar (Coptic) is on a papyrus from Egypt in AH 22, PERF 558.
Due to the Islamic calendar's reliance on certain variable methods of observation to determine its month-start-dates, these dates sometimes vary slightly from the month-start-dates of the astronomical lunar calendar[which?], which are based directly on astronomical calculations. Still, the Islamic calendar seldom varies by more than three days from the astronomical-lunar-calendar system, and roughly approximates it. Both the Islamic calendar and the astronomical-lunar-calendar take no account of the solar year in their calculations, and thus both of these strictly lunar based calendar systems have no ability to reckon the timing of the four seasons of the year.
df19127ead