hebrew_jdn

Description

hebrew_jdn converts a provided  Hebrew date into a Julian day number. Julian day number 347998 correspondts to the Hebrew date Tishri 1 of the Hebrew year 1, which is the day when the earth is supposed to have been created.

Gory Details

hebrew_jdn is based on a mathematical representation of the lunar month. jdn_hebrew takes trhee input arguments: the Hebrew year, the Hebrew month and a Hebrew day. The routine returns a ulian Day Number.

Representation of the hebrew month can be difficult, if you don't know whether the Hebrew year is a leap year or not. (See Hebrew_LeapYear for details.) To make things easier, you can use negative numbers, where -1 means "the last month of the year", -1 means "the last but one month" and so on. See Jewish holidays for some applications of this feature.

This routine uses several helper routines, which are described on ohter pages of this web site.

Code section

Function hebrew_jdn(ByVal iYear, ByVal iMonth, ByVal iDay) As Long
    Dim jdn As Long
    Dim counter As Integer
    If iMonth < 0 Then
        If Hebrew_LeapYear(iYear) Then
            iMonth = 14 + iMonth
        Else
            iMonth = 13 + iMonth
        End If
    End If
    jdn = Hebrew_ElapsedCalendarDays(iYear)
    For counter = 1 To (iMonth - 1) Step 1
        jdn = jdn + Hebrew_LastDayOfMonth(iYear, counter)
    Next counter
    hebrew_jdn = jdn + (iDay - 1 + 347997)
End Function

See also

Hebrew_LeapYear, Hebrew_ElapsedCalendarDays, Hebrew_LastDayOfMonth, Jewish holidays, jdn_hebrew, Claus Tøndering's Calendar Faq.

Last update

Julian Day Number: 2452096
Civil (Gregorian) date: 5 July 2001
Julian date: 22 June 2001
Hebrew date: 14 Tammuz 5761
Islamic date: 13 Rabi' II 1422

Back to Calendar Math.
mail me
Kees Couprie
Other pages by the same author.