added utility function to turn date strings into date objects