Extract isValidDate()