The Jewish calendar is based on both the lunar and the solar cycles and is used for computing Jewish holidays. Hebrew days begin at sunset when three stars are visible. An ordinary year has 12 months, and a leap year has 13 months. Every month starts approximately on the day of a new moon. There are three year lengths for ordinary years and three for leap years.
In a regular year, months alternate between 29 and 30 days.
The Jewish New Year starts on 1 Tishri, called Rosh Hashana, which celebrates the creation of the world (assumed to be 3761 BC). There is a rather complicated set of 5 rules for determining the date of Rosh Hashana. A formula for computing Rosh Hashana is given by Berlekamp et al. (1982), and a Lisp program for computing the Jewish calendar by Reingold and Dershowitz (1989).
Sunset is the time at which the trailing limb of the Sun first sets below the horizon. The effect of refraction in the Earth’s atmosphere lifts the image of the Sun about half a degree at the horizon, making sunset about two minutes later than would be expected from the actual position of the Sun in space. Refraction and the fact that sunrise and sunset are calculated from the limb (and not the center) slightly lengthen “day” relative to “night.”
Berlekamp, E. R.; Conway, J. H.; and Guy, R. K. Winning Ways, For Your Mathematical Plays, Vol. 2: Games in Particular. London: Academic Press, p. 800, 1982.
Dershowitz, N. and Reingold, E. M. Calendrical Calculations: The Millennium Edition. Cambridge, England: Cambridge University Press, 1999.
Reingold, E. M. and Dershowitz, N. “Calendrical Calculations.” Technical Report UIUCCDCS-R-89-1541. Department of Computer Science, Univ. Illinois, Urbana-Champaign, IL, 1989. ftp://a.cs.uiuc.edu/.
Ross, K. L. “The Jewish and Moslem Calendars and the Era of Nabonassar.” http://www.friesian.com/calendar.htm#nabo.
Ross, K. L. “The Jewish Calendar.” http://www.friesian.com/calendar.htm#jewish.
Tøndering, C. “Frequently Asked Questions about Calendars.” http://www.tondering.dk/claus/calendar.html.
Vardi, I. Computational Recreations in Mathematica. Redwood, CA: Addison-Wesley, p. 240, 1991.