I think the issue is the input for the date could either be:
September 8, 1636
or
9/8/1636
The date the user entered was missing the comma, so apparently that is not a valid input date format.
@ritamgit-alt In your else code block, you will not be able to just split on whitespace like split() does. You will have to be able to validate the comma appears and then either remove it before splitting or split using comma as the delimeter to get a list containing the text month as one item and the day and year as the second item. Then, you would split the second item using whitespace as delimeter to get a list contain day and years as items.
You stated in the beginning that for a text date to be considered valid input, it should have a comma separating the month name and the rest of the date (day and year). Is that still correct? If the answer is “Yes”, then you need to check to make sure the comma exists before splitting the date. If the comma is missing, then you should reject as invalid date.