script to extract date of first day of each census period