Halacha

הלכה א
חָדְשָׁה שֶׁל לְבָנָה תִּשְׁעָה וְעֶשְׂרִים יוֹם וּמֶחֱצָה וְתשצ''ג חֲלָקִים כְּמוֹ שֶׁבֵּאַרְנוּ. וְאִי אֶפְשָׁר לוֹמַר שֶׁרֹאשׁ הַחֹדֶשׁ יִהְיֶה בְּמִקְצָת הַיּוֹם עַד שֶׁיִּהְיֶה מִקְצָת הַיּוֹם מֵחֹדֶשׁ שֶׁעָבַר וּמִקְצָתוֹ מֵהַבָּא. שֶׁנֶּאֱמַר (במדבר יא כ) "עַד חֹדֶשׁ יָמִים" מִפִּי הַשְּׁמוּעָה לָמְדוּ שֶׁיָּמִים אַתָּה מְחַשֵּׁב לְחֹדֶשׁ וְאִי אַתָּה מְחַשֵּׁב שָׁעוֹת:
כסף משנה
1.
A lunar month is twenty-nine and one half days, and 793 units, as we have explained.1Chapter 6, Halachah 3. It is impossible for Rosh Chodesh to begin in the middle of the day - i.e., that a portion of the day would be part of the previous month and a portion of the day would be part of the following month - as [implied by Numbers 11:20]: "For a month of days...." According to the Oral Tradition,2Megillah 5a. this was interpreted [to mean], "You count the days of a month; you do not count the hours [of a month]."

הלכה ב
לְפִיכָךְ עוֹשִׂין חָדְשֵׁי הַלְּבָנָה מֵהֶן חֹדֶשׁ חָסֵר וּמֵהֶם חֹדֶשׁ מָלֵא. חֹדֶשׁ חָסֵר תִּשְׁעָה וְעֶשְׂרִים יוֹם בִּלְבַד וְאַף עַל פִּי שֶׁחָדְשָׁהּ שֶׁל לְבָנָה יֶתֶר עַל זֶה בְּשָׁעוֹת. וְחֹדֶשׁ מָלֵא מִשְּׁלֹשִׁים יוֹם וְאַף עַל פִּי שֶׁחָדְשָׁהּ שֶׁל לְבָנָה פָּחוֹת מִזֶּה בְּשָׁעוֹת. כְּדֵי שֶׁלֹּא לְחַשֵּׁב שָׁעוֹת בַּחֹדֶשׁ אֶלָּא יָמִים שְׁלֵמִים:
כסף משנה
2.
Therefore, some lunar months are established as lacking [a day], and others as full. A month that is lacking has only twenty- nine days, even though a lunar month is several hours longer. A full month is thirty days, even though a lunar month is several hours shorter. In this manner, the months will be calculated according to complete days, not according to hours.

הלכה ג
אִלּוּ הָיָה חָדְשָׁהּ שֶׁל לְבָנָה תִּשְׁעָה וְעֶשְׂרִים יוֹם וּמֶחֱצָה בִּלְבַד הָיוּ כָּל הַשָּׁנִים חֹדֶשׁ מָלֵא וְחֹדֶשׁ חָסֵר. וְיִהְיוּ יְמֵי שְׁנַת הַלְּבָנָה שנ''ד, שִׁשָּׁה חֳדָשִׁים חֲסֵרִים וְשִׁשָּׁה חֳדָשִׁים מְלֵאִים. אֲבָל מִפְּנֵי הַחֲלָקִים שֶׁיֵּשׁ בְּכָל חֹדֶשׁ וְחֹדֶשׁ יוֹתֵר עַל חֲצִי הַיּוֹם יִתְקַבֵּץ מֵהֶן שָׁעוֹת וְיָמִים. עַד שֶׁיִּהְיוּ מִקְצָת הַשָּׁנִים חֳדָשִׁים חֲסֵרִים יוֹתֵר עַל הַמְּלֵאִים וּבְמִקְצָת הַשָּׁנִים חֳדָשִׁים מְלֵאִים יוֹתֵר עַל הַחֲסֵרִים:
כסף משנה
3.
If a lunar month were exactly twenty-nine and a half days [long], the years [would be divided evenly] into full and lacking months, and there would be exactly 354 days to a lunar year. Thus, there would be six full months and six lacking months. It is the units that exist in every month that exceed the half day - which ultimately add up to hours and days - that cause certain years to have more lacking months than full months, and other years to have more full months than lacking months.

הלכה ד
יוֹם שְׁלֹשִׁים לְעוֹלָם עוֹשִׂין אוֹתוֹ רֹאשׁ חֹדֶשׁ בְּחֶשְׁבּוֹן זֶה. אִם הָיָה הַחֹדֶשׁ שֶׁעָבַר חָסֵר יִהְיֶה יוֹם שְׁלֹשִׁים רֹאשׁ חֹדֶשׁ הַבָּא. וְאִם יִהְיֶה הַחֹדֶשׁ שֶׁעָבַר מָלֵא יִהְיֶה יוֹם שְׁלֹשִׁים רֹאשׁ חֹדֶשׁ הוֹאִיל וּמִקְצָתוֹ רֹאשׁ חֹדֶשׁ. וְיִהְיֶה תַּשְׁלוּם הַחֹדֶשׁ הַמָּלֵא שֶׁעָבַר. וְיִהְיֶה יוֹם אֶחָד וּשְׁלֹשִׁים רֹאשׁ הַחֹדֶשׁ הַבָּא וּמִמֶּנּוּ הוּא הַמִּנְיָן. וְהוּא יוֹם הַקְּבִיעָה. וּלְפִיכָךְ עוֹשִׂין רָאשֵׁי חֳדָשִׁים בְּחֶשְׁבּוֹן זֶה חֹדֶשׁ אֶחָד יוֹם אֶחָד בִּלְבַד וְחֹדֶשׁ אֶחָד שְׁנֵי יָמִים:
כסף משנה
4.
According to this reckoning, the thirtieth day of the month is always established as Rosh Chodesh. If the month is lacking, the thirtieth day will be Rosh Chodesh of the coming month.
If the month is full [the coming month will have two days that are Rosh Chodesh]. The thirtieth day will be Rosh Chodesh, since a portion of it is [fit to be] Rosh Chodesh. [Nevertheless,] it will be counted as the completion of the previous month, which was full. The thirty-first day also will be Rosh Chodesh, and the reckoning [of the days of the coming month] will start from it. It is the day established [as Rosh Chodesh].
Thus, according to this calculation, there are some months that have only one day Rosh Chodesh, and other months that have two days Rosh Chodesh.

הלכה ה
סֵדֶר הֶחֳדָשִׁים הַמְּלֵאִים וְהַחֲסֵרִים לְפִי חֶשְׁבּוֹן זֶה כָּךְ הוּא. תִּשְׁרֵי לְעוֹלָם מָלֵא. וְטֵבֵת לְעוֹלָם חָסֵר. וּמִטֵּבֵת וְאֵילָךְ אֶחָד מָלֵא וְאֶחָד חָסֵר עַל הַסֵּדֶר. כֵּיצַד. טֵבֵת חָסֵר שְׁבָט מָלֵא. אֲדָר חָסֵר נִיסָן מָלֵא. אִיָּר חָסֵר סִיוָן מָלֵא. תַּמּוּז חָסֵר אָב מָלֵא. אֱלוּל חָסֵר. וּבְשָׁנָה הַמְעֻבֶּרֶת אֲדָר רִאשׁוֹן מָלֵא וַאֲדָר שֵׁנִי חָסֵר:
כסף משנה
5.
The following is the order of the full and lacking months according to [our] fixed calendar: Tishrei is always full. Tevet is always lacking. From Tevet on, there is one full month and one lacking month in sequence.
What is implied? Tevet is lacking; Shevat is full; Adar is lacking; Nisan is full; Iyar, lacking; Sivan, full; Tammuz, lacking; Av, full; Elul, lacking. In a leap year, the first Adar is full,3This supports the Rambam's contention that it is the first Adar that is the extra month of the year. (See the notes on Chapter 4, Halachah 1.) and the second Adar is lacking.

הלכה ו
נִשְׁאֲרוּ שְׁנֵי הֶחֳדָשִׁים שֶׁהֵן מַרְחֶשְׁוָן וְכִסְלֵו. פְּעָמִים יִהְיוּ שְׁנֵיהֶם מְלֵאִים וּפְעָמִים יִהְיוּ שְׁנֵיהֶם חֲסֵרִים וּפְעָמִים יִהְיֶה מַרְחֶשְׁוָן חָסֵר וְכִסְלֵו מָלֵא. וְשָׁנָה שֶׁיִּהְיוּ בָּהּ שְׁנֵי חֳדָשִׁים אֵלּוּ מְלֵאִים הִיא שֶׁנִּקְרְאוּ חֳדָשֶׁיהָ שְׁלֵמִים. וְשָׁנָה שֶׁיִּהְיוּ בָּהּ שְׁנֵי חֳדָשִׁים אֵלּוּ חֲסֵרִים נִקְרְאוּ חֳדָשֶׁיהָ חֲסֵרִין. וְשָׁנָה שֶׁיִּהְיוּ בָּהּ מַרְחֶשְׁוָן חָסֵר וְכִסְלֵו מָלֵא נִקְרְאוּ חֳדָשֶׁיהָ כְּסִדְרָן:
כסף משנה
6.
Two months remain: Marcheshvan and Kislev. Sometimes they are [both] full; sometimes they are [both] lacking; and sometimes Marcheshvan is lacking and Kislev is full.
A year in which both of these months are full is called a year of complete months. A year in which both these months are lacking is called a year of lacking months. And a year in which Marcheshvan is lacking and Kislev is full is called a year whose months [proceed] in order.4For all the months of the year from Marcheshvan onward proceed in sequence, one full and one lacking.

הלכה ז
דֶּרֶךְ יְדִיעַת הַשָּׁנָה אִם חֳדָשֶׁיהָ מְלֵאִים אוֹ חֲסֵרִין אוֹ כְּסִדְרָן לְפִי חֶשְׁבּוֹן זֶה כָּךְ הוּא. תֵּדַע תְּחִלָּה יוֹם שֶׁנִּקְבַּע בּוֹ רֹאשׁ הַשָּׁנָה שֶׁתִּרְצֶה לֵידַע סִדּוּר חֳדָשֶׁיהָ כְּמוֹ שֶׁבֵּאַרְנוּ בְּפֶרֶק שְׁבִיעִי. וְתֵדַע יוֹם שֶׁיִּקָּבַע בּוֹ רֹאשׁ הַשָּׁנָה שֶׁלְּאַחֲרֶיהָ. וּתְחַשֵּׁב מִנְיַן הַיָּמִים שֶׁבֵּינֵיהֶן חוּץ מִיּוֹם הַקְּבִיעָה שֶׁל זוֹ וְשֶׁל זוֹ. אִם תִּמְצָא בֵּינֵיהֶן שְׁנֵי יָמִים יִהְיוּ חָדְשֵׁי הַשָּׁנָה חֲסֵרִין. וְאִם תִּמְצָא בֵּינֵיהֶם שְׁלֹשָׁה יָמִים יִהְיוּ כְּסִדְרָן. וְאִם תִּמְצָא בֵּינֵיהֶם אַרְבָּעָה יָמִים יִהְיוּ חָדְשֵׁי הַשָּׁנָה שְׁלֵמִים:
כסף משנה
7.
The way to know whether the months of a year will be lacking, will be complete, or will [proceed] in order [can be explained] as follows: First, determine the day on which Rosh HaShanah will fall in the year about whose months you desire to know, as explained in Chapter 7. Then determine the day on which Rosh HaShanah will fall in the year that follows.
Afterwards, count the number of days between them without including the day on which Rosh HaShanah falls in either of these years. If there are only two days between them,5The Rambam gives examples in Halachah 9 to illustrate this situation and those that follow. When there are two days between the days on which Rosh HaShanah is celebrated in successive years, the year is 50 weeks and three days - i.e., 353 days - long. the months of the year will be lacking. If there are three days between them,6When there are three days between the days on which Rosh HaShanah is celebrated in successive years, the year is 50 weeks and four days - i.e., 354 days - long. the months of the year will proceed in order. And if there are four days between them,7When there are four days between the days on which Rosh HaShanah is celebrated in successive years, the year is 50 weeks and five days - i.e., 355 days - long. The remainder of an ordinary lunar year is slightly more than four days, producing a year whose months proceed in order. Frequently, however, the year will contain an extra day, if, because of the reasons mentioned in the previous chapter, the celebration of Rosh HaShanah is postponed. Similarly, it may lack a day, because the celebration of Rosh HaShanah was postponed in the previous year. the months of the year will be complete.

הלכה ח
בַּמֶּה דְּבָרִים אֲמוּרִים כְּשֶׁהָיְתָה הַשָּׁנָה שֶׁתִּרְצֶה לֵידַע סִדּוּר חֳדָשֶׁיהָ פְּשׁוּטָה. אֲבָל אִם הָיְתָה מְעֵבֶּרֶת. אִם תִּמְצָא בֵּין יוֹם קְבִיעָתָהּ וּבֵין יוֹם קְבִיעַת שָׁנָה שֶׁלְּאַחֲרֶיהָ אַרְבָּעָה יָמִים יִהְיוּ חָדְשֵׁי אוֹתָהּ שָׁנָה הַמְעֻבֶּרֶת חֲסֵרִים. וְאִם תִּמְצָא בֵּינֵיהֶם חֲמִשָּׁה יָמִים יִהְיוּ כְּסִדְרָן. וְאִם תִּמְצָא בֵּינֵיהֶם שִׁשָּׁה יִהְיוּ שְׁלֵמִים:
כסף משנה
8.
When does the above apply? When the year in question is an ordinary year. When, however, [the year in question] is a leap year [different rules apply]: If there are only four days between the day on which [Rosh HaShanah] is established [in the leap year] and the day on which it will be established in the following year, the months of the year will be lacking.8In such a situation, there will be 54 weeks and five days in the year, a total of 383 days. If there are five days between these [two days], the months of the year will proceed in order. And if there are six days between them, the months of the year will be complete.

הלכה ט
כֵּיצַד. הֲרֵי שֶׁרָצִינוּ לֵידַע סִדּוּר חָדְשֵׁי שָׁנָה זוֹ. וְהָיָה רֹאשׁ הַשָּׁנָה בַּחֲמִישִׁי וְהִיא פְּשׁוּטָה וְרֹאשׁ הַשָּׁנָה שֶׁלְּאַחֲרֶיהָ בְּשֵׁנִי בְּשַׁבָּת. נִמְצָא בֵּינֵיהֶן שְׁלֹשָׁה יָמִים. יָדַעְנוּ שֶׁשָּׁנָה זוֹ חֳדָשֶׁיהָ כְּסִדְרָן. וְאִלּוּ הָיָה רֹאשׁ הַשָּׁנָה שֶׁלְּאַחֲרֶיהָ בִּשְׁלִישִׁי הָיוּ חָדְשֵׁי הַשָּׁנָה זוֹ שְׁלֵמִים. וְאִלּוּ הָיָה רֹאשׁ הַשָּׁנָה בְּשָׁנָה זוֹ בְּשַׁבָּת וּבַשָּׁנָה שֶׁלְּאַחֲרֶיהָ בִּשְׁלִישִׁי בְּשַׁבָּת הָיוּ חָדְשֵׁי שָׁנָה זוֹ חֲסֵרִין. וְעַל דֶּרֶךְ זוֹ תְּחַשֵּׁב לַשָּׁנָה הַמְעֻבֶּרֶת כְּמוֹ שֶׁבֵּאַרְנוּ:
כסף משנה
9.
What is implied? If we desire to know the order of the months of the present year, and [we know the following]: Rosh HaShanah falls on Thursday; it is an ordinary year; and in the following year Rosh HaShanah falls on Monday, there are three days between them and the months of the year proceed in order.9For there are three days - Friday, the Sabbath, and Sunday - between the days on which Rosh HaShanah is celebrated in the years in question.
If Rosh HaShanah falls on Tuesday in the following year, the months of the year will be complete.10For there are four days - Friday, the Sabbath, Sunday, and Monday - between the days on which Rosh HaShanah is celebrated in these successive years. If Rosh HaShanah falls on the Sabbath in the present year, and on Tuesday in the following year, the months of the year will be lacking.11For there are only two days between them. Similar concepts should be applied regarding the calculation [of the order of the months] of a leap year, as was explained.

הלכה י
יֵשׁ שָׁם סִימָנִין שֶׁתִּסְמֹךְ עֲלֵיהֶם כְּדֵי שֶׁלֹּא תִּטְעֶה בְּחֶשְׁבּוֹן סִדּוּר חָדְשֵׁי הַשָּׁנָה וְהֵן בְּנוּיִין עַל עִקְּרֵי זֶה הַחֶשְׁבּוֹן וְהַקְּבִיעוֹת וְהַדְּחִיּוֹת שֶׁבֵּאַרְנוּ דַּרְכָּם. וְאֵלּוּ הֵן. כָּל שָׁנָה שֶׁיִּהְיֶה רֹאשׁ הַשָּׁנָה בָּהּ בַּשְּׁלִישִׁי תִּהְיֶה לְעוֹלָם כְּסִדְרָן לְפִי חֶשְׁבּוֹן זֶה. בֵּין פְּשׁוּטָה בֵּין מְעֻבֶּרֶת. וְאִם יִהְיֶה רֹאשׁ הַשָּׁנָה בְּשַׁבָּת אוֹ בְּשֵׁנִי לֹא תִּהְיֶה כְּסִדְרָן לְעוֹלָם בֵּין בִּפְשׁוּטָה בֵּין בִּמְעֵבֶּרֶת. וְאִם יִהְיֶה רֹאשׁ הַשָּׁנָה בַּחֲמִישִׁי. אִם פְּשׁוּטָה הִיא אִי אֶפְשָׁר שֶׁיִּהְיוּ חֳדָשֶׁיהָ חֲסֵרִים לְפִי חֶשְׁבּוֹן זֶה. וְאִם מְעֻבֶּרֶת הִיא אִי אֶפְשָׁר שֶׁיִּהְיוּ חֳדָשֶׁיהָ כְּסִדְרָן לְפִי חֶשְׁבּוֹן זֶה:
כסף משנה
10.
There are certain indications upon which one can rely, so that one will not err regarding the calculation of the order of the months of a year. These principles are based on the fundamental principles of the fixed calendar and the determination of the days on which Rosh HaShanah will be established and those that will cause it to be postponed, as we explained previously.
Whenever Rosh HaShanah is celebrated on a Tuesday, [the months of] the year will [proceed] in order. [This applies regardless of whether the year] is an ordinary year or a leap year.12As mentioned, Rosh HaShanah cannot fall on Sunday, Wednesday, or Friday. Therefore, in an ordinary year, if Rosh HaShanah falls on a Tuesday, the following year it cannot fall on a Thursday, for then there would be only one day between them, producing a year of only 352 days. Nor can it fall on a Monday, for then the year would be 356 days long. Thus, the only day on which it can fall is the Sabbath, producing a year of 354 days. In such a year, the months proceed in order.
When Rosh HaShanah falls on Tuesday in a leap year, it cannot fall on Thursday or the Sabbath in the following year, for that would produce a year that is too short (380 or 382) days. Nor can it fall on Tuesday itself, for Rosh HaShanah falls on Tuesday only when the conjunction takes place not later than Tuesday, before noon. When the remainder of a leap year - 5 days, 21 hours, and 589 units - is added to noon time on Tuesday, the result is that the conjunction of the following year will take place on Sunday. Since Rosh HaShanah is never celebrated on Sunday, the holiday will be postponed until Monday. Thus, the length of the leap year will be 384 days, the length of a year whose months proceed in order.

Whenever Rosh HaShanah is celebrated on the Sabbath or on a Monday, [the months of] the year will never [proceed] in order. [This applies regardless of whether the year] is an ordinary year or a leap year.13For the months of an ordinary year to proceed in order, the year must be 354 days long. That means that if Rosh HaShanah fell on the Sabbath, it would have to fall on Wednesday in the following year, which is impossible. Similarly, if Rosh HaShanah fell on Monday, it would have to fall on Friday in the following year, which is also impossible.
For the months of a leap year to proceed in order, the year must be 384 days long. That means that if Rosh HaShanah had fallen on the Sabbath, in the following year it would have to fall on Friday, which is impossible. Similarly, if Rosh HaShanah had fallen on Monday, in the following year it would have to fall on Sunday, which is also impossible.

[The following rules apply when] Rosh HaShanah falls on a Thursday. If the year is an ordinary year, it is impossible for its months to be lacking.14When the months of an ordinary year are lacking, the year has only 353 days. Thus, if Rosh HaShanah fell on Thursday, it would have to fall on Sunday in the following year, which is impossible. If it is a leap year, it is impossible for its months to proceed in order.15When the months of a leap year are lacking, the year has 383 days. Thus, if Rosh HaShanah fell on Thursday, it would have to fall on Wednesday in the following year, which is impossible.

זמנים הלכות קידוש החודש פרק ח
Zemanim Kiddush HaChodesh Chapter 8