jDateInYear

Navigation:  Appendices > Macro Language > Built-in Functions > All Functions (Alphabetical) >

jDateInYear

Previous pageReturn to chapter overviewNext page

int = jDate1InYear(jDay, jMonth, nYear)

int = jDate2InYear(jDay, jMonth, nYear)

 

These macro functions return the first and, eventually, second date on which a Jewish date occurs for the regular year nYear.

 

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

 

 nYomKippur = jDate1InYear(1, 10, 2005)

 

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.

 

 bTwoOccurences = (jDate2InYear(jDay, jMonth, aYear) > 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 occurences.


Topic 161200 updated on 01-Oct-2001.
Topic URL: http://www.qppstudio.net/webhelp/index.html?jdateinyear.htm