Completed functions to create date table.