Please enable JavaScript to view this site.

 

int = jDate1InYear(njMonth, njDay, nWesternYear)

int = jDate2InYear(njMonth, njDay, nWesternYear)

 

These macro functions return the first and, if present, second occurrence of the specified Jewish day and month within the Gregorian year nWesternYear.

 

For example, to calculate the date of Yom Kippur in 2028:

nYomKippur = jDate1InYear(1, 10, 2028)

There are 2 functions because the Jewish calendar is not exactly aligned with the Gregorian, Western, calendar and therefore a given Jewish date may occur more than once in a Gregorian year. To determine if a given Jewish day-month pair occurs more than once in a year, you need to see if the value of jDate2InYear() is larger than 0.

bTwoOccurrences = (jDate2InYear(njMonth, njDay, nWesternYear) > 0)

In practice, this concerns only Jewish dates which fall around January 1st, which fortunately does not correspond to any of the major Jewish holidays. But if you are evaluating arbitrary Jewish dates in your macros, you should always check for multiple occurrences.

 

Adar and Leap Years

 

Specify the Jewish month number first, followed by the day and Gregorian year. If the requested month does not exist in a candidate Jewish year, these functions retry using the month number plus 2.

 

Consequently, Adar (6) becomes Adar II (8) in a leap year; Adar I (7) becomes Nisan (9), and Adar II (8) becomes Iyar (10), in a non-leap year. An invalid day in the replacement month is not adjusted; that candidate is discarded.

 

The functions return −1 when no first or second matching occurrence, respectively, is found within the requested Gregorian year.

 

See also: jDayOf, jMonthOf, jYearOf and Jewish dates functions.

 


Topic 161200, last updated on 27-Oct-2026