Refactored the date validation script to split out the date handling into a function
Added time validation to JS datetime validation