better date range check