update to handling of dates