Added function to check if date is entered correctly
needs more tests