THE TWO DAYS OF ROSH HASHANAH
Gemara
4b - Rav and Shmuel: If an egg was laid on the first day of Rosh Hashanah, it is forbidden even on the second day.
(Mishnah): At first, witnesses who saw the new moon could testify at any time (on Elul 30). Once, witnesses delayed coming and the Leviyim erred in the Shir (they did not know whether or not the day would be Rosh Hashanah). It was enacted not to accept witnesses after Minchah. If witnesses came after Minchah, we would treat the rest of the day like Kodesh and also the next day. (There is no doubt; both days are one long Kedushah.)
Rabah: After R. Yochanan ben Zakai's enactment, an egg laid on the first day is permitted on the second:
(Mishnah): After Churban Beis ha'Mikdash, R. Yochanan ben Zakai enacted that witnesses may testify at any time. (Nowadays both days are Kodesh because of Safek. The egg is permitted on the second day, for either the second day is Chol, or the egg was laid on (the first day, which was) Chol.
Question (Abaye): Rav and Shmuel forbid!
Answer (Rabah): I have a greater source to permit, R. Yochanan ben Zakai!
Question: The Mishnah of R. Yochanan ben Zakai refutes Rav and Shmuel!
Answer: Indeed, Rabah permits in Eretz Yisrael. Rav and Shmuel discuss Chutz la'Aretz. There, the first enactment (two days of Vadai Kedushah) still applies.
Rav Yosef: Even after R. Yochanan ben Zakai, the egg is forbidden (even in Eretz Yisrael). This is because it was forbidden through a Minyan (Chachamim voted to enact two days of Vadai Kedushah), therefore another Minyan is needed to permit it.
5b - Question (Abaye): The Minyan did not (directly) forbid the egg. It was forbidden because testimony was forbidden (so the two days are Vadai Kodesh). Now that testimony is permitted, automatically the egg is permitted!
Rav Ada and Rav Salman: Even after R. Yochanan ben Zakai, the egg is forbidden. This is a decree. If people eat the egg this year, they will do so also next year, even though (hopefully) the Mikdash will be rebuilt by then. They will not realize that last year the days were two (Safek) Kedushos, and now (the first enactment applies again, so) they are one (Vadai) Kedushah.
Question: If so, we should also forbid accepting testimony, lest next year they accept after Minchah, just like this previous year!
Answer: Beis Din accepts testimony (they will not err), but all people deal with eggs.
Rava: Even after R. Yochanan ben Zakai, the egg is forbidden. R. Yochanan ben Zakai agrees that if witnesses came after Minchah, we treat both days with (Vadai) Kedushah.
Rava: The Halachah follows Rav (and Shmuel).
6a - Rava: On Yom Tov Rishon, Nochrim we may do needs of a Mes through Nochrim. On Yom Tov Sheni, even of Rosh Hashanah, Yisraelim do its needs.
Mar Zutra: This is only if much time has elapsed since the death.
Rav Ashi: It is even there has not been a long delay. Regarding a Mes, Yom Tov Sheni is like a weekday, even to make shrouds and cut myrtle.
Rishonim
Rif: After R. Yochanan ben Zakai's enactment, Rabah permits the egg on the second day. Abaye challenges this. We answer that Rabah discusses Eretz Yisrael, and Rav and Shmuel discuss Chutz la'Aretz.
Ba'al ha'Ma'or: Even in Eretz Yisrael, Rabah permits only Makom ha'Va'ad (where witnesses gave testimony). Elsewhere people keep two days due to Safek just like before R. Yochanan ben Zakai, like in Chutz la'Aretz. In Makom ha'Va'ad there were two days of Vadai Kedushah before R. Yochanan ben Zakai. After his enactment there are not. If witnesses do not come the entire day, this shows that the day was truly Chol. We did not do Melachah because we did not know at the time.
Beis Yosef (OC 513 DH u'Mah she'Chosav uva'Yom): When witnesses come after Minchah and are not accepted, the second day is Kodesh mid'Oraisa, and we count from it to Yom Kipur. Nevertheless, mid'Rabanan the first day is also Yom Tov, lest people do Melachah the next year on the first day. People far from the Va'ad must be concerned that witnesses came after Minchah, therefore the two days are one Vadai Kedushah.
Rif: Rava concludes that even after R. Yochanan ben Zakai it is forbidden, for if witnesses would come after Minchah both days would be Kodesh.
Rambam (Hilchos Yom Tov 1:24): Regarding the two days of Rosh Hashanah, an egg laid on the first day is forbidden on the second. The same applies to other Hachanos. The same applies to Yom Tov on Erev Shabbos or Motza'ei Shabbos, even if Yom Tov Sheni is on Erev Shabbos.
Rosh (1:3): Rabah permits the egg on the second day after R. Yochanan ben Zakai's enactment. Abaye challenges this. We answer that Rabah discusses Eretz Yisrael, and Rav and Shmuel discuss Chutz la'Aretz. Rav Yosef forbids because it was forbidden through a Minyan (therefore another Minyan is needed to permit it. Rabah (our text says Rava) retracted and concluded that even after R. Yochanan ben Zakai it is forbidden, for if witnesses would come after Minchah both days would be Kodesh.
Poskim
Shulchan Aruch (513:5): If an egg was laid on Yom Tov Rishon it is permitted on Yom Tov Sheni of Chutz la'Aretz, but not on the second day of Yom Tov of Rosh Hashanah. Also, if Yom Tov is adjacent to Shabbos, an egg laid on one is forbidden on the other.
Mishnah Berurah (14): If we are unsure whether it was born on the first day of Rosh Hashanah (or earlier), some permit on the second day and some forbid.
Shulchan Aruch (496:2): The only differences between Yom Tov Rishon and Yom Tov Sheni pertain to a Mes and to painting an (aching) eye. On Yom Tov Rishon these are permitted only through Nochrim; on Yom Tov Sheni they are permitted through Yisrael, except for Rosh Hashanah (regarding healing), which is one Kedushah.
Rema: The same applies to any Choleh who is not dangerously sick. On Yom Tov Sheni (of Galus) we permit a Yisrael only Shevus, like painting an eye.
Shulchan Aruch (526:4): Yisraelim may do needs to a Mes on Yom Tov Sheni, even of Rosh Hashanah, even if has not been a long time since the death. They may even cut attached myrtle, make shrouds and a casket, dig a grave... and take it to another city if there is no cemetery for Yisraelim in this city. Regarding a Mes, Yom Tov Sheni is like a weekday, even if Nochrim could do these things.
Mishnah Berurah (24): Yom Tov Sheni is like Chol ha'Mo'ed regarding needs of a Mes. One may not quarry rocks or chop down trees. One may saw wood and sew shrouds only in the Chatzer of the Mes, so all will know that it is for the Mes.
Rema: In Ashkenaz and our lands we prepare the shrouds, casket and grave through Nochrim, if possible. Other things are done by Yisraelim like on Yom Tov Rishon. If it is not possible through Nochrim, Yisraelim do everything. We may cover the Mes normally with dirt, unlike some who are stringent.
Shulchan Aruch (ibid.): This is if it will be buried that day. If not, we do not do any Melachah, even through Nochrim. One may move it.