Revert "isValidDateRange function"

This reverts commit 4fb205d1963acf96ebdf8cd9d372c713f3e24e57.
Revert "Revert "isValidDateRange function""

This reverts commit 6d8315e86bc5a594d9d22dba9c85a28578483e7b.
isValidDateRange

oops useless revert