Minor change to gen_dates().