fix bug: check with date, not with datetime