switch to a date object instead of a string