For women with irregular menstrual cycles, dating the pregnancy can be more challenging. In such cases, an ultrasound is often used to determine the gestational age. The ultrasound measurements of the fetus can provide a more accurate estimate of the due date, especially during the first trimester.