First, you need to define what is the acceptable format for your date. For example 12/13/13 is valid if MM/DD/YY, but not valid if DD/MM/YY or YY/MM/DD. Do you accept months as numbers or full name, on 3 letters? Is year a two digit or a 4 digit number? What separators do you accept (space, -, /)?
Ok:
1. Find first instance of "/" character. If not found, date is not valid and exit
2. Get the substring from 0 to position of "/" as month_string, and the rest as rest_string.
3. Try to convert month_string to an integer month, and check if 1<=month<=12. If any is wrong, your date is invalid and exit.
4. Get the rest_string, find "/". If not found, date is invalid
5. Get day and year strings, similar to month string.
6. If year is not between 0 and 99 date is invalid
7. If day<1 date is invalid
8. Do a switch by month to get the upper limit on days. Remember, February has 28 days, unless ((year%4 ==0) && (year>0))
How do I do #2. substr() won't work for me. I assume it's because I'm comparing a char struct? How would I convert Info.date into a string so i could get it? Thanks.