Gestational body weight gain was calculated on the basis of the weight measured at the first prenatal visit ( fifth to sixth weeks of gestation ) and weight measured at the last visit to the clinic before delivery .