SHAVING ON EREV YOM TOV [Yom Tov: shaving]
Gemara
(Beraisa - R. Yosi): A Nazir Olam may cut his hair every Erev Shabbos (this is normal for princes).
Question: If so, how was Avshalom different than his brothers?
Answer #1: When Yom Tov fell during the week, his brothers would cut their hair on Erev Yom Tov, but he did not.
Answer #2: His brothers could cut their hair on Erev Shabbos in the morning, but he was forbidden until Panya (the end of the day).
Mo'ed Katan 14a: (A Mishnah lists people who may shave during Chol ha'Mo'ed.) Why is everyone else forbidden to shave during the ha'Mo'ed?
Answer (Mishnah): Kohanim serving this week in the Beis ha'Mikdash may not shave or launder.
(Rabah bar bar Chanah): This is in order that they not enter their week of service unkempt.
Here also, we forbid shaving during the Mo'ed, lest people enter the Mo'ed unkempt.
Rishonim
Rif and Rosh (Mo'ed Katan 7a and 3:1): We forbid shaving during the Mo'ed, lest people enter the Mo'ed unkempt.
Rambam (Hilchos Yom Tov 7:17): Chachamim decreed that one may not shave or launder during the Mo'ed, lest one will delay doing so until the Mo'ed, and he will enter Yom Tov Rishon unkempt. Therefore, one who could not shave or launder Erev Yom Tov may shave or launder during the Mo'ed.
Mishpat Uzi'el (3:69 DH uv'Emes): The Rambam and Bartenura say that the Isur to shave during the Mo'ed is lest people delay shaving until the Mo'ed when they are idle from work, and they will enter the Mo'ed unkempt. The Gemara said only the latter reason. It seems that the Rambam learned the former reason from the fine for one who intentionally leaves Melachah for Chol ha'Mo'ed (Mo'ed Katan 13b). This is even like the opinion that shaving is not a proper Melachah. The Gemara gives also the former reason to forbid even if we do not know that he intentionally delayed shaving. The Rambam forbids even one who shaved on Erev Yom Tov to shave during the Mo'ed, for it is evident that he shaved during the Mo'ed, and people might suspect that he did not shave Erev Yom Tov. All the more so we forbid one who shaved days before Yom Tov. Every day of growth of hair mars a man's beauty. This is why a king cuts his hair every day, and a Kohen Gadol every Erev Shabbos when a new Mishmar enters. Every Yisrael is like a king when he enters the Mo'ed, so he should shave, even if his hair has not grown. One who did not shave was Mevatel an obligatory Mitzvah mid'Rabanan, just like it is obligatory to honor Yom Tov with Yom Tov clothing.
Note: If every day's growth mars a man's beauty, why does it say that a king cuts his hair every day? He should shave every day! The Kohen Gadol had a beautiful and difficult haircut that left each hair long enough to reach to the next hair (Nedarim 51a). When Yosef saw himself ruling, he began to curl his hair (Rashi Bereishis 39:6, based on Medrash Tanchuma 8)! If letter of the law one may shave during the Mo'ed, and this is most beautiful, why should one who shaves during the Mo'ed be suspected that he did not do so Erev Yom Tov? If the only concern is suspicion, why is it forbidden to cut hair during the Mo'ed? It is not evident that a person did so during the Mo'ed! I did not find other Meforshim distinguish between cutting hair and shaving.
Question: Why didn't the Gemara in Nazir say that Avshalom was different because he brought Korbanos when he shaved?
Answer #1 (Perush ha'Rosh DH Mai): The Gemara said that he did not shave until Panya. This means until bringing Korbanos. The Gemara could have said that they may use scissors and may cut everything, and he could use only a razor and could only lighten his hair. It did not, for Bnei Melachim normally use a razor and do not cut everything.
Answer #2 (Tosfos DH Mai): The Gemara understood that there was a difference in the shaving itself.
Poskim
Shulchan Aruch (531:1): It is a Mitzvah to shave on Erev Yom Tov.
Shulchan Aruch (OC 548:8): If an Avel observed the laws of Shivah and the Regel came, it cancels Sheloshim. Even if the seventh day was Erev ha'Regel, he may cut his hair on Erev ha'Regel.
Question (Beis Yosef DH u'Mah she'Chosav Rabeinu Mutar): The Tur permits to shave on Erev ha'Regel, no matter which day of Shivah it is. This is difficult, for we permit an Avel to shave on Chol ha'Mo'ed if he was unable to before the Regel, e.g. his seventh day was Shabbos Erev ha'Regel (17b). The Rosh agrees with the Ra'avad who permits shaving on Erev ha'Regel because shaving is forbidden all 30 days. Surely this is when Erev ha'Regel is the seventh day!
Answer #1 (Beis Yosef DH Aval): I would say that 'shaving' is a textual mistake in the Tur, but it says so also in Yoreh De'ah, and also R. Yerucham permits. It seems that they hold that we always permit Erev ha'Regel, but not on the previous day, e.g. when Erev ha'Regel is Shabbos.
Answer #2 (Darchei Moshe 2): The Tur permits shaving that is permitted on Chol ha'Mo'ed, such as the mustache.
Mishnah Berurah (40): The Aveilus is until Bein ha'Shemashos; perhaps it does not apply to Tosefes Yom Tov. The Bach says that Tosefes is two hours before evening (Tzeis ha'Kochavim).
Birkei Yosef (6): Sha'arei Yeshu'ah (OC 6:7) says that if the 30 days of Aveilus over a parent ended during the Mo'ed and he was rebuked for his long hair, it is a Mitzvah to shave on Erev of the last Yom Tov.
Shulchan Aruch (YD 399:3): If one buried his Mes seven days before a Regel and observed laws of Sheloshim, the Regel cancels Sheloshim. This is even if the seventh day was Erev ha'Regel, for Miktzas ha'Yom k'Kulo. The day counts for Shivah and Sheloshim. He may cut his hair on Erev ha'Regel.
Rema (YD): This is permitted close to dark.
Birkei Yosef: Perush ha'Rosh holds that even though a Nazir (Olam) may shave only due to the Regel, he need not wait until evening. The same applies to an Avel who may shave due to the Regel. However, Tosfos answered unlike the Rosh. Tosfos and the Ritva hold that the Heter is only b'Fanya, i.e. (just before) dark. It is not clear why the Tur rules unlike the Rosh.
Mishpat Uzi'el (3:69 DH uv'Emes): We do not find an explicit Mitzvah to shave on Erev Yom Tov, just we infer it from the Isur to shave during the Mo'ed. If one did not shave Erev Yom Tov he was not Mevatel the Mitzvas Aseh of Simchas Chag, just he did not honor himself properly for Yom Tov. Therefore, it is not uprooting a Mitzvah from the Torah to say that one may not shave during the Mo'ed.