Finished date handling function, wrote associated tests