I assume that you know what the first line does. 😉
The second line splits the date-string at each - and by using the list() function, we assign the values to three variables instead of accepting it as an array.
The syntax for the checkdate() function is:
bool checkdate ( int month, int day, int year)
If the date is valid, checkdate() return true, otherwise false. Because of that, we can use it in an if statement to see if the date was valid.
-- lilleman