Let's build a Jewish calendar!

Alright, let the fun begin! Now that we have a working new moon time that we can go by, we can find out how to build a calendar for any Jewish year. We will get to the steps in a moment, but first, quick guess! What is the year 1 like?

Remember, the molad for the year 1 (easily determined to be a regular year) is Sunday night at 11:11:20 p.m. A quick molad table check indicates Monday as the day of Rosh Hashanah (thanks to the S/W/F and PM conditions) and 355 days (maximum regular) as the size of the year (that means only 12 months altogether, with Cheshvan and Kislev both having 30 days apiece). See? That was easy! Now you can go ahead and compose each of the months. Okay, time for more of a challenge—here we go with the standard procedure!


Determine the given year's classification and the number of months between its beginning and that of year 1.

This sounds like two steps, but they are combined into one, because the first-year offset formula can provide us with the classification as well as the offset itself. Keep in mind that this formula, INT ((235y - 234)/19), involves dividing 235y - 234 by 19. We can settle for the exact result. Or we can opt for what we really need, the integer quotient, which gives us the offset, and the remainder, which helps us determine the leap status. So the process can be broken down as follows:

a. Multiply the given year y by 235, then subtract 234 from this product.
b. Divide this difference by 19.
c. The integer quotient is the number of months from the start of the year 1 to that of the year y.
d. If the remainder is 12 or greater, then the year y is a leap year. Otherwise, it is a regular one.

If y is a regular year, then hold on to that remainder—it may be needed again later on in Step 4!


Use the number of months between the beginnings of the given year and year 1 to determine the change (phase shift), along the week, between these two times.

This is a big procedure, of which there is more than one way to carry it out. I'll outline at least one way of doing it:

a. Take the number of months (this is the actual-based month offset, of course), and multiply it by the size of the lunar cycle, i.e., 29 days + 12 hours + 44 minutes + 3 1/3 seconds, thus expressing the offset in days (retain whatever hours, minutes and seconds remain as well, carrying these smaller units of time into whole days as necessary).
b. Divide this day offset result by 7 days, obtaining only the remainder (this means that the hours, minutes and seconds end up not being divided here, only the days—thus the smaller units in the remainder are the same as those in the day offset being divided). What we end up with is the phase shift (the number of days of which should be less than 7).


Determine the given year's new moon time by adding the week-related phase shift to the new moon time of year 1.

Upon performing this addition, be sure to carry the hours, minutes and seconds, as necessary, into the days. A good approach is to let Sunday = 1 day, Monday = 2 days, etc., all the way up to letting Friday = 6 days. But let Saturday = 0 days, instead of 7 (it's good math practice in light of the fact that the values for any of the smaller time units can also be 0). Since Sunday is the day of the week (Western notation) when the very first molad occurred, the phase shift is added to 1 day + 23 hours + 11 minutes + 20 seconds. If the number of days in the result is 7 or more, subtract 7 from this number (thus subtracting a week's worth) in order to get the number of days back into the 0 to 6 range. The resulting number for the days unit indicates the day of the week (0 days = Saturday, 1 day = Sunday, etc.), and—along with the smaller time units—this gives us the new moon time in the week for the given year! (Keep in mind that the range of 0 through 11 hours corresponds to the a.m. hours, beginning with 12:00 midnight, and that the range of 12 through 23 hours corresponds to the p.m. hours, beginning with 12:00 noon.)


Look up the given year's new moon time in the appropriate molad table in order to get this year's size (in days) and starting day of the week (when Rosh Hashanah is observed).

Before we check the tables, is the given year a non-leap year? If so, does its new moon time occur at or after 9:32:43+1/3 a.m., but before 12:00 noon on a Monday? If so, we will need to know the leap status of the previous year. Or if the given year, being a non-leap year, has its new moon time take place at or after Thursday, 6:22:40 p.m., but before Friday, 3:11:20 a.m., we will need to know the leap status of the next year. Remember that remainder back in Step 1 that you were told to hold on to? We will need it now if we need to know the leap status of the applicable adjacent year! Do you also remember the "rotational addition or subtraction of 7 based on a range of 19 numbers, from 0 to 18" that was discussed in the previous section? Okay, then, let's take the given year's remainder, which was saved back in Step 1, and perform such a rotational addition of 7 to it in order to get the remainder for the next year, or perform such a rotational subtraction of 7 from the saved remainder in order to get the remainder for the previous year. Next, check that adjacent year's remainder in order to determine its leap status (equal to, or greater than, 12, the adjacent year is a leap year; less than 12, it's a regular one). With that year's classification known, we are ready to do the table lookup.

Use the regular (non-leap) year molad table if the given year is a regular year. If it is a leap year, use the leap year table. The summarized molad tables in Section 3 are recommended for quicker results, although the detailed ones in Section 2 can be utilized as well.

Retrieve from the table the applicable day of the week for Rosh Hashanah (i.e., the day on which the first of Tishri takes place), and the year's length (in days), and we are finally equipped with the information we need to compose all of the months for that given year!!

And there you have it. That's how the Jewish calendar is done!

Let us do a few examples, so that you will get a better feel.