WIP: finished moving all date code into one place