1

I am a software engineer and currently thinking about dates/times. In programming, all dates are in the Gregorian calendar system, and things start to break down when you get to dealing with CE/BCE. However, I started looking at other calendars, like the Hebrew calendar, and wonder if it has ever been "formalized" in some way or another into something that can be modeled by a computer.

Briefly reading through the Hebrew calendar wiki, some things that stick out are days begin at evening 1 and end at evening 2, so they depend on the sun / local relative position, so that seems tough to model formally. "Nightfall occurs when three medium-sized stars become visible after sunset." Also, "months are based on lunar months, but years are based on solar years.". There are a short few charts in the Wiki, like this one:

enter image description here

I don't know how accurate that is, or if it changes a lot between solar years, but there's that. It seems that at least you could hardcode some Hebrew months by rough days (since days have that nightfall characteristic), and then do some leap month/year stuff. But it seems tricky. Has anyone done this before? Do there exist any formal models which could be translated into software fairly easily? If not, why not, what are the key reasons it can't be done? I know this isn't a software SE, but perhaps if you knew of open source software too that would be helpful, but not necessary. Just knowing if it is possible to "formally" model the Hebrew calendar would be quite helpful, and potentially where to find more detailed information (in English).

2
  • 3
    There are a number of packages available already that do these conversions. Best to check them out before you reinvent the wheel
    – Double AA
    Commented Apr 15, 2022 at 18:09
  • 1
    Check out hebcal.com and their API for a starting point
    – mbloch
    Commented Apr 16, 2022 at 18:13

1 Answer 1

2

There has been formal work done on a computationally derived calendar, most notably:

Reingold, E.M., & Dershowitz, N. (2018). Calendrical Calculations: The Ultimate Edition. Cambridge University Press

More accessible are the earlier papers:

Reingold, E.M., & Dershowitz, N. (1990). Calendrical calculations. Software-Practice and Experience, 20(9), 899-928. https://doi.org/10.1002/spe.4380200905

Reingold, E.M., Dershowitz, N., & Clamen, S.M. (1993). Calendrical calculations, part II: Three historical calendars. Software-Practice and Experience, 23(4), 383-404. https://doi.org/10.1002/spe.4380230404

I think these works have served as the computational framework behind hebcal.com, but I am not sure about that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .