civil_julian converts a provided Civil date into an Julian date. It works for both the Gregorian calendar and the Julian calendar, meaning that a civil date from before the Gregorian calendar was introduced, is simply returned.
The function presented here is just one example of an algorithm to convert a date from one calendar top another, using the Julian Day Number (jdn). It starts by calling civil_jdn, to calculate the Julian day number for the provided civil date. From this Julian day number, the Julian year, month and day are derived, by calling jdn_julian.
Sub civil_julian(ByRef iYear As Integer, _
ByRef iMonth As Integer, _
ByRef iDay As Integer)
Call jdn_julian(civil_jdn(iYear, _
iMonth, _
iDay), _
iYear, iMonth, iDay)
End Sub
civil_jdn, jdn_julian, julian_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. |