Halacha

הלכה א
חָדְשֵׁי הַשָּׁנָה הֵם חָדְשֵׁי הַלְּבָנָה שֶׁנֶּאֱמַר (במדבר כח יד) "עלַת חֹדֶשׁ בְּחָדְשׁוֹ" וְנֶאֱמַר (שמות יב ב) "הַחֹדֶשׁ הַזֶּה לָכֶם רֹאשׁ חֳדָשִׁים". כָּךְ אָמְרוּ חֲכָמִים הֶרְאָה לוֹ הַקָּדוֹשׁ בָּרוּךְ הוּא לְמשֶׁה בְּמַרְאֵה הַנְּבוּאָה דְּמוּת לְבָנָה וְאָמַר לוֹ כָּזֶה רְאֵה וְקַדֵּשׁ. וְהַשָּׁנִים שֶׁאָנוּ מְחַשְּׁבִין הֵם שְׁנֵי הַחַמָּה שֶׁנֶּאֱמַר (דברים טז א) "שָׁמוֹר אֶת חֹדֶשׁ הָאָבִיב":
כסף משנה
1.
The months of the year are lunar months, as [implied by Numbers 28:14]: "... the burnt offering of the month when it is renewed,"1The concept of a renewal each month is relevant regarding lunar months, but not with regard to solar months. For the moon is not seen for a day or two each month, while the sun shines continually every day throughout the year. and [Exodus 12:2]: "This month shall be for you the first of months."2Although the implication to a lunar month in this verse is not as obvious as in the former verse, there is an explicit teaching from our Sages indicating a connection, as the Rambam proceeds to explain. [Concerning this verse,] our Sages commented:3Mechilta D'Rashbi on the above verse; see also Midrash Tanchumah, Shemini, sec. 8; Menachot 29a. The Holy One, blessed be He, showed Moses in the vision of prophecy an image of the moon and told him, "When you see the moon like this, sanctify it."
The years we follow are solar years, as [implied by Deuteronomy 16:1]: "Keep the month of spring."4Sanhedrin 13b (cited by the Rambam, Chapter 4, Halachah 1) explains that this verse is a charge to arrange the calendar so that the vernal (spring) equinox always falls in the month of Nisan.

הלכה ב
וְכַמָּה יְתֵרָה שְׁנַת הַחַמָּה עַל שְׁנַת הַלְּבָנָה קָרוֹב מֵאַחַד עָשָׂר יוֹם. לְפִיכָךְ כְּשֶׁיִּתְקַבֵּץ מִן הַתּוֹסֶפֶת הַזֹּאת כְּמוֹ שְׁלֹשִׁים יוֹם אוֹ פָּחוֹת מְעַט אוֹ יוֹתֵר מְעַט מוֹסִיפִין חֹדֶשׁ אֶחָד וְעוֹשִׂין אוֹתָהּ הַשָּׁנָה שְׁלֹשָׁה עָשָׂר חֹדֶשׁ וְהִיא הַנִּקְרֵאת שָׁנָה מְעֵבֶּרֶת. שֶׁאִי אֶפְשָׁר לִהְיוֹת הַשָּׁנָה שְׁנֵים עָשָׂר חֹדֶשׁ וְכָךְ וְכָךְ יָמִים שֶׁנֶּאֱמַר (שמות יב ב) "לְחָדְשֵׁי הַשָּׁנָה". חֳדָשִׁים אַתָּה מוֹנֶה לְשָׁנָה וְאֵין אַתָּה מוֹנֶה יָמִים:
כסף משנה
2.
How much longer is a solar year than a lunar year? Approximately eleven days.5The Rambam speaks in more precise figures in Chapter 6. At present, he is speaking in general terms to give an outline of the how the Jewish calendar is structured. Therefore, [to correct the discrepancy between the lunar and the solar calendars,] when these additional days reach a sum of 30 - or slightly more, or slightly less - an additional month is added, causing the year to include thirteen months. This is called a full year.
[This is necessary,] because it is impossible to have a year with twelve months and an odd number of days, as [implied by Numbers 28:14]: "... of the months of the year." [On this verse, our Sages6Megillah 5a. commented:] "You count the months of a year, but not the days of a year."

הלכה ג
הַלְּבָנָה נִסְתֶּרֶת בְּכָל חֹדֶשׁ וְאֵינָהּ נִרְאֵית כְּמוֹ שְׁנֵי יָמִים אוֹ פָּחוֹת אוֹ יוֹתֵר מְעַט. כְּמוֹ יוֹם אֶחָד קֹדֶם שֶׁתִּדְבַּק בַּשֶּׁמֶשׁ בְּסוֹף הַחֹדֶשׁ וּכְמוֹ יוֹם אֶחָד אַחַר שֶׁתִּדְבַּק בַּשֶּׁמֶשׁ וְתֵרָאֶה בַּמַּעֲרָב בָּעֶרֶב. וּבַלַּיִל שֶׁתֵּרָאֶה בַּמַּעֲרָב אַחַר שֶׁנִּסְתְּרָה הוּא תְּחִלַּת הַחֹדֶשׁ וּמוֹנִין מֵאוֹתוֹ הַיּוֹם תִּשְׁעָה וְעֶשְׂרִים יוֹם. וְאִם יֵרָאֶה הַיָּרֵחַ לֵיל שְׁלֹשִׁים יִהְיֶה יוֹם שְׁלֹשִׁים רֹאשׁ הַחֹדֶשׁ. וְאִם לֹא יֵרָאֶה יִהְיֶה רֹאשׁ הַחֹדֶשׁ יוֹם אֶחָד וּשְׁלֹשִׁים וְיִהְיֶה יוֹם שְׁלֹשִׁים מֵחֹדֶשׁ שֶׁעָבַר. וְאֵין נִזְקָקִין לַיָּרֵחַ בְּלֵיל אֶחָד וּשְׁלֹשִׁים בֵּין שֶׁנִּרְאָה בֵּין שֶׁלֹּא נִרְאָה. שֶׁאֵין לְךָ חֹדֶשׁ לְבָנָה יוֹתֵר עַל שְׁלֹשִׁים יוֹם:
כסף משנה
3.
The moon becomes hidden and cannot be seen for approximately two days - or [slightly] less or slightly more - every month: approximately one day before its conjunction with the sun at the end of the month, and one day after its conjunction with the sun, [before] it is sighted in the west in the evening.7As explained in the notes to Chapter 11, when the sun, the moon, and the earth are aligned in a straight line in that order, the moon reflects the sun's rays directly back to it, and no light can be seen from the earth. This is called the conjunction of the sun and the moon. Afterwards, the moon proceeds in its orbit away from the sun, and within approximately one day's time it will have moved a sufficient distance for it to reflect a small crescent of light to the earth. This crescent will always be sighted first in the western portion of the sky, close to the horizon.
The commentaries note that Rosh HaShanah 20b states that the moon cannot be seen for twenty-four hours every month. Aruch HaShulchan (Hilchot Kiddush HaChodesh, sec. 88) explains that there is no contradiction to the Rambam's statements here. There are twenty-four hours every month in which it is impossible to see the moon. There is in addition, however, approximately one day every month when the probability of seeing the moon is very low.

The first night when the moon is sighted in the west after being hidden is the beginning of the month. Afterwards, 29 days are counted from that day. If the moon is sighted on the night of the thirtieth [day], the thirtieth day will be Rosh Chodesh [of the following month].
If it is not sighted, Rosh Chodesh will be on the thirty-first day, and the thirtieth day will be included in the previous month. There is no need [to sight] the moon on the thirty-first night; whether or not [the moon] is sighted [the new month begins that night]. For there are no lunar months longer than thirty days.

הלכה ד
חֹדֶשׁ שֶׁיִּהְיֶה תִּשְׁעָה וְעֶשְׂרִים וְיֵרָאֶה יָרֵחַ בְּלֵיל שְׁלֹשִׁים נִקְרָא חֹדֶשׁ חָסֵר. וְאִם לֹא יֵרָאֶה הַיָּרֵחַ וְיִהְיֶה הַחֹדֶשׁ שֶׁעָבַר שְׁלֹשִׁים יוֹם נִקְרָא חֹדֶשׁ מְעֻבָּר וְנִקְרָא חֹדֶשׁ מָלֵא. וְיָרֵחַ שֶׁיֵּרָאֶה בְּלֵיל שְׁלֹשִׁים הוּא הַנִּקְרָא יָרֵחַ שֶׁנִּרְאָה בִּזְמַנּוֹ. וְאִם נִרְאָה בְּלֵיל אֶחָד וּשְׁלֹשִׁים וְלֹא נִרְאָה בְּלֵיל שְׁלֹשִׁים הוּא נִקְרָא יָרֵחַ שֶׁנִּרְאָה בְּלֵיל עִבּוּרוֹ:
כסף משנה
4.
When there are twenty-nine days in a month, [because] the moon was sighted on the thirtieth night, the month is called chaseir, ["lacking"]. If the moon is not sighted and the previous month has thirty days, the month is called me'ubar ["pregnant"] or malei ["full"].
When the moon is sighted on the thirtieth night, the moon is said to have been sighted at the appropriate time. When the moon is sighted on the thirty-first night, but not on the thirtieth night, the moon is described as having been seen on the night of its fullness.

הלכה ה
אֵין רְאִיַּת הַיָּרֵחַ מְסוּרָה לְכָל אָדָם כְּמוֹ שַׁבַּת בְּרֵאשִׁית שֶׁכָּל אֶחָד מוֹנֶה שִׁשָּׁה וְשׁוֹבֵת בַּשְּׁבִיעִי. אֶלָּא לְבֵית דִּין הַדָּבָר מָסוּר עַד שֶׁיְּקַדְּשׁוּהוּ בֵּית דִּין וְיִקְבְּעוּ אוֹתוֹ הַיּוֹם רֹאשׁ חֹדֶשׁ הוּא שֶׁיִּהְיֶה רֹאשׁ חֹדֶשׁ. שֶׁנֶּאֱמַר (שמות יב ב) "הַחֹדֶשׁ הַזֶּה לָכֶם" עֵדוּת זוֹ תִּהְיֶה מְסוּרָה לָכֶם:
כסף משנה
5.
The [establishment of Rosh Chodesh] based on the sighting of the moon is not the province of every individual,8I.e., in contrast to the Sabbath, a person who thinks that he has sighted the moon may not begin counting the days of the new month on his own initiative. Rather, he must go to the Sanhedrin and present his testimony to them, and it is they who decide whether or not to begin the new month. (Note the Rambam's comments in Sefer HaMitzvot , Positive Commandment 153, where he elaborates on this theme.) as is the Sabbath [of the weekly cycle]. [In the latter instance,] everyone counts six days and rests on the seventh day.
[The sanctification of the new month,] by contrast, has been entrusted to the court.9I.e., the Sanhedrin, the High Court that held sessions in Jerusalem until the Temple's destruction, and afterwards was located in various cities throughout Eretz Yisrael. [The new month does not begin] until it has been sanctified by the court, and it is the day that they establish as Rosh Chodesh that is Rosh Chodesh. [This is implied by the verse,] "This month will be for you...," - i.e., the testimony [concerning the new month] will be entrusted to you.10As explained in Rosh HaShanah 22a, this command was addressed to Moses and Aaron. The words "to you" are seemingly unnecessary. Thus, they are interpreted to mean that just as this command is being given to you, so too, the fulfillment of it in subsequent times will be the responsibility of men like you - i.e., the judges of Israel's High Court. (See Chapter 2, Halachah 8, which mentions an application of this principle. See also Chapter 5, Halachah 1.)

הלכה ו
בֵּית דִּין מְחַשְּׁבִין בְּחֶשְׁבּוֹנוֹת כְּדֶרֶךְ שֶׁמְּחַשְּׁבִים הָאִיצְטַגְנִינִים שֶׁיּוֹדְעִין מְקוֹמוֹת הַכּוֹכָבִים וּמַהֲלָכָם וְחוֹקְרִים וּמְדַקְדְּקִים עַד שֶׁיֵּדְעוּ אִם אֶפְשָׁר שֶׁיֵּרָאֶה הַיָּרֵחַ בִּזְמַנּוֹ שֶׁהוּא לֵיל שְׁלֹשִׁים אוֹ אִי אֶפְשָׁר. אִם יָדְעוּ שֶׁאֶפְשָׁר שֶׁיֵּרָאֶה יוֹשְׁבִין וּמְצַפִּין לָעֵדִים כָּל הַיּוֹם כֻּלּוֹ שֶׁהוּא יוֹם שְׁלֹשִׁים. אִם בָּאוּ עֵדִים וּדְרָשׁוּם וַחֲקָרוּם כַּהֲלָכָה וְנֶאֶמְנוּ דִּבְרֵיהֶם מְקַדְּשִׁין אוֹתוֹ. וְאִם לֹא נִרְאָה וְלֹא בָּאוּ עֵדִים מַשְׁלִימִין שְׁלֹשִׁים וְיִהְיֶה חֹדֶשׁ מְעֵבָּר. וְאִם יָדְעוּ בְּחֶשְׁבּוֹן שֶׁאִי אֶפְשָׁר שֶׁיֵּרָאֶה אֵין יוֹשְׁבִים יוֹם שְׁלֹשִׁים וְאֵין מְצַפִּין לָעֵדִים. וְאִם בָּאוּ עֵדִים יוֹדְעִין בְּוַדַּאי שֶׁהֵן עֵדֵי שֶׁקֶר אוֹ שֶׁנִּרְאֵית לָהֶם דְּמוּת לְבָנָה מִן הֶעָבִים וְאֵינָהּ הַלְּבָנָה הַוַּדָּאִית:
כסף משנה
6.
The [High] Court would make calculations in a manner resembling11Rav Kapach explains that the Rambam chose his wording exactly. The calculations of the High Court merely "resembled the calculations of the astronomers." In truth, however, they operated under a different system. As the Rambam explains in Chapter 17, Halachah 24, the prophets and the descendants of the tribe of Issachar had a method of calculating the movement of the sun, the moon, and the stars, which had been transmitted to Moses on Mount Sinai. Although this method resembled the method of calculations employed by gentile scholars, it was unique and different. (See also the Rambam's Commentary on the Mishnah, Rosh HaShanah 2:8.)
This method of calculation was lost to our people shortly after the composition of the Mishnah. Subsequent texts, including the Rambam's own system of calculation, as explained from Chapter 11 onward, were based on Greek sources.
the calculations of the astronomers, who know the location of the stars and their paths [in their orbits]. They would perform careful research to determine whether or not they would be able to sight the moon at the appropriate time - i.e., the thirtieth night.
If [the judges] determined that it was possible to sight [the moon], they would sit waiting for witnesses [to come and testify] throughout the entire thirtieth day. If witnesses came, and [the court] examined their testimony according to law, and verified the truth [of their statements], the court would sanctify [the new month]. If [the moon] was not sighted, and witnesses did not come,12Because the moon was covered with clouds or for other similar reasons. (See Chapter 18, Halachah 1.) they would complete the thirtieth day, thus making the month full.
If, according to their calculations, [the judges] knew that it was impossible for the moon to be sighted, they would not sit [in session] on the thirtieth day, nor would they await [the arrival] of witnesses. If witnesses came, they would know that they are false witnesses, or that clouds appeared to them in a form resembling the moon, but it was not the real moon.

הלכה ז
מִצְוַת עֲשֵׂה מִן הַתּוֹרָה עַל בֵּית דִּין שֶׁיְּחַשְּׁבוּ וְיֵדְעוּ אִם יֵרָאֶה הַיָּרֵחַ אוֹ לֹא יֵרָאֶה. וְשֶׁיִּדְרְשׁוּ אֶת הָעֵדִים עַד שֶׁיְּקַדְּשׁוּ אֶת הַחֹדֶשׁ. וְיִשְׁלְחוּ וְיוֹדִיעוּ שְׁאָר הָעָם בְּאֵי זֶה יוֹם הוּא רֹאשׁ חֹדֶשׁ כְּדֵי שֶׁיֵּדְעוּ בְּאֵי זֶה יוֹם הֵן הַמּוֹעֲדוֹת. שֶׁנֶּאֱמַר (ויקרא כג ב) "אֲשֶׁר תִּקְרְאוּ אֹתָם מִקְרָאֵי קֹדֶשׁ" וְנֶאֱמַר (שמות יג י) "וְשָׁמַרְתָּ אֶת הַחֻקָּה הַזֹּאת לְמוֹעֲדָהּ":
כסף משנה
7.
It is a positive commandment of the Torah13See Sefer HaMitzvot (Positive Commandment 153) and Sefer HaChinuch (Mitzvah 4), which consider this to be one of the Torah's 613 mitzvot. for the court to calculate and determine whether or not the moon will be sighted, to examine witnesses until the moon can be sanctified, and to send forth [messengers] to inform the remainder of the people on which day Rosh Chodesh was observed,14The Rambam mentions three activities imperative on the court in fulfillment of this mitzvah: the calculation of the time for the sighting of the moon, the examination of the witnesses, and the notification of the Jewish people.
It is interesting to note that the structure of Hilchot Kiddush HaChodesh represents somewhat of a departure from the Rambam's usual style of presentation in the Mishneh Torah. He generally begins by citing a mitzvah and the proof-text from which it is derived, and afterwards he describes it. In this instance, the Rambam begins by describing the basic ground rules for the sighting of the moon, and afterwards he explains the mitzvah that is associated with this sighting.
Rav Kapach suggests that this approach could have been taken in reaction to the position of Rav Sa'adiah Gaon, who maintains that the fundamental aspect of determining the calendar was not the sighting of the moon, but rather the calculations of the Sages. See the Rambam's Commentary on the Mishnah (Rosh HaShanah 2:6).
so that they will know the day [on which to celebrate] the festivals [as implied by Leviticus 23:2]: "that you will pronounce as days of holy convocation,"15As stated in the conclusion of Chapter 2, this verse is an indication that the determination of the days on which the festivals are to be celebrated - and thus the establishment of the monthly calendar on which the former depends - was entrusted to the Jewish High Court. and [as implied by Exodus 13:10]: "And you shall observe this statute in its appointed season."16This verse refers to the Paschal sacrifice and teaches us that there is an obligation to "observe this statute," bring the Paschal sacrifice, "at its appointed time" - i.e., in the spring. This alludes to the second dimension of this mitzvah, the establishment of leap years so that the holiday of Pesach will always fall in the spring.
Note the Ramban (Hasagot to Sefer HaMitzvot, Shoresh 1), who cites opinions that consider these two dimensions - the establishment of Rosh Chodesh and the decision whether to observe leap years - as two separate mitzvot.
The Rambam's citation of this proof-text has attracted the attention of commentaries because of another difficulty. In Menachot 36b, the meaning of this verse is the subject of a difference of opinion between Rabbi Akiva and Rabbi Yosse HaG'lili. While the simple meaning of the phrase "this statute" is the Paschal sacrifice - and this is the interpretation of Rabbi Akiva - Rabbi Yosse HaG'lili interprets the phrase as referring to the mitzvah of wearing tefillin.
What is significant is that in the Mishneh Torah, the Rambam cites both the interpretations of Rabbi Akiva (in this halachah) and that of Rabbi Yosse HaG'lili (Hilchot Tefillin 4:10) as Torah law. The commentaries (see Radbaz, Vol. V, Responsum 1693) explain that this is indicative of a general pattern within the Mishneh Torah. The Rambam's intent in composing the Mishneh Torah was to provide us with a text of Torah practice, not a source book explaining the derivation of Torah law. He refers to verses only when they are necessary as supports. Therefore, in each instance he cites the proof-text that has the most obvious connection to the law or principle he is referring to, although it is possible that there is another verse from which this law was actually derived.

הלכה ח
אֵין מְחַשְּׁבִין וְקוֹבְעִין חֳדָשִׁים וּמְעַבְּרִין שָׁנִים אֶלָּא בְּאֶרֶץ יִשְׂרָאֵל שֶׁנֶּאֱמַר (ישעיה ב ג) "כִּי מִצִּיּוֹן תֵּצֵא תוֹרָה וּדְבַר ה' מִירוּשָׁלָיִם". וְאִם הָיָה אָדָם גָּדוֹל בְּחָכְמָה וְנִסְמַךְ בְּאֶרֶץ יִשְׂרָאֵל וְיָצָא לְחוּצָה לָאָרֶץ וְלֹא הִנִּיחַ בְּאֶרֶץ יִשְׂרָאֵל כְּמוֹתוֹ הֲרֵי זֶה מְחַשֵּׁב וְקוֹבֵעַ חֳדָשִׁים וּמְעַבֵּר שָׁנִים בְּחוּצָה לָאָרֶץ. וְאִם נוֹדַע לוֹ שֶׁנַּעֲשָׂה בְּאֶרֶץ יִשְׂרָאֵל אָדָם גָּדוֹל כְּמוֹתוֹ וְאֵין צָרִיךְ לוֹמַר גָּדוֹל מִמֶּנּוּ הֲרֵי זֶה אָסוּר לִקְבֹּעַ וּלְעַבֵּר בְּחוּצָה לָאָרֶץ וְאִם עָבַר וְקָבַע וְעִבֵּר לֹא עָשָׂה כְּלוּם:
כסף משנה
8.
The calculations and the establishment of the months and the leap years is carried out only in Eretz Yisrael [as implied by Isaiah 2:3]: "For out of Zion will emerge the law, and the word of God [will emerge] from Jerusalem."17See Sefer HaMitzvot, loc. cit., where the Rambam explains the connection of this mitzvah - and the Jewish people as a whole - to Eretz Yisrael in stirring terms.
If a great sage who received semichah18The ordination conveyed upon the Sages from Sage to Sage, in a chain that began with Moses himself. (See Hilchot Sanhedrin, Chapter 4.) in Eretz Yisrael left for the diaspora without leaving a colleague of equal stature in Eretz Yisrael, he may make calculations, establish the monthly calendar, and institute leap years in the diaspora.19Yevamot 122a relates that Rabbi Akiva journeyed to Neharde'a for this purpose, and from the narrative in Berachot 63a, it would appear that Chanina, Rabbi Yehoshua's nephew, lived in Babylon and ordained the order of the calendar from there for several years.If, however, it becomes known to him that a sage of his stature has arisen in Eretz Yisrael - and surely, if a sage of greater stature has arisen in Eretz Yisrael - it is forbidden for him to establish [the monthly calendar] and [institute] leap years in the diaspora.20Berachot, ibid., states that the Sages of Eretz Yisrael ordered Chanina to stop ordaining the calendar, because "the kids that you left behind have grown and become billy-goats with horns" - i.e., the Sages who were once on a lower level of understanding had matured and achieved a par with him. If he transgresses, and [attempts to structure the calendar in this manner], his actions are of no consequence.21The Rambam is speaking about the era when the beginning of the new month was determined through the testimony of witnesses. The use of the fixed calendar we follow at present is discussed in Chapter 5.

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