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:
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).