fixing detection when a date is 'today'