The ideal time to have hymenoplasty is 45 days before the anticipated date of intercourse.