refactor datetime_filter to be more abstract and taking less responsibil...

...ities.