civil_islamic converts a provided Civil date into an Islamic (Hijri) date. It works for both the Gregorian calendar and the Julian calendar (see also civil_jdn)
The function presented here is just one example of an algorithm to convert a Civil date to an Islamic date. It starts by calling civil_jdn, to calculate the Julian day number for the provided civil date. From this Julian day number, the Islamic year, month and day are derived, by calling jdn_islamic.
Note that the Islamic year is approximately 11 days shorter than the Civil year. This means that the Islamic calendar ``runs faster´´ and will eventually overtake the Civil Calendar. From the first day of the fifth month of the year 20874 (20874-05-01) until the thirtieth day of that month (20874-05-30) the Civil and Islamic dates are exactly the same!
Sub civil_islamic(ByRef iYear As Integer, _
ByRef iMonth As Integer, _
ByRef iDay As Integer)
Call jdn_islamic(civil_jdn(iYear, _
iMonth, _
iDay), _
iYear, iMonth, iDay)
End Sub
civil_jdn, jdn_islamic, islamic_civil
| Julian Day Number: | 2451995 |
| Gregorian date: | March 26, 2001 |
| Julian date: | March 13, 2001 |
| Hebrew date: | Nisan 2, 5761 |
| Islamic date: | Muharram 1, 1422 |
| Back to Calendar Math. | Other pages by the same author. |