https://letuscrack.com/function-validatedate/
Function validateDate