Tonight is the first night of Passover. And like all Jewish holidays, it is governed by the Jewish calendar. This calendar is a delightfully complicated combination of the solar and lunar calendars, with leap months instead of leap days. When trying to understand it, you end up learning terms like the Metonic cycle (a 19-year period that allows lunar months and solar years to synchronize) and intercalation.
So it should come as no surprise that there are some subtleties to how the first day of Passover is determined. But worry no longer! This kind of thing can be encapsulated in a handy algorithm as found in the paper "Gauss Formula for the Julian Date of Passover" by Zvi Har'El of the Technion. While you can of course look at an online Hebrew calendar and find out when Passover begins, this paper examines how to calculate just one specific value: the first day of Passover. And in case you are wondering, since many of us use the Gregorian calendar rather than the Julian calendar, the paper helpfully has code at the end for both cases, adding a correction factor if you want the Gregorian date for the beginning of Passover.
To calculate the Julian date for the first day of Passover you simply input the Hebrew year Y and then do some calculations that look like the following:
And this is just the beginning! It is a rather complex calculation to figure out which day of the calendar the first day of Passover falls on. I recommend that you do not do this with paper and pencil. Use a computer. There's even an implementation in Java.
Next Year in Python.