1,088. Immersion After Delivery
157:8 It is permitted to have relations with a virgin for the first time on Shabbos even though doing so makes a wound.
158:1 If a woman delivered a baby, either alive or stillborn, or if she had a miscarriage, she has "childbirth uncleanliness." This is so even if she didn't see blood. According to the law, if she had a boy, she is unclean from childbirth for seven days, after which she counts seven clean days and immerses in a mikvah. If she had a girl, she is unclean from childbirth for fourteen days, after which she counts seven clean days and immerses.
Some places have the practice not to immerse until after forty days for a boy and eighty days for a girl. One should not be lenient in places where this practice is kept by everyone because there are some reasons for it. Cases such as this are the reasons behind Proverbs 1:8: "My son, hear the instruction of your father, and do not forsake the Torah of your mother." In our lands, however, this is not a universal practice. On the other hand, the practice of some places not to go to the mikvah until after six weeks for a boy and nine weeks for a girl - this and similar such customs are baseless and have already been abolished by the Gaonim.