better date range handling