Originally Posted by
matsp
There are two distinct questions here:
1. How to compare strings, ignoring case. Many C libraries have a function called either stricmp or strcasecmp which does this. Alternatively, convert the string to all lowercase using a loop and tolower (or uppercase and toupper).
2. How to know how many days in a month, which is a bit trickier than what you describe: The months, in order from January to December have 31, 28 (29), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 days. You can do this using a switch based on month, or an array based on month, but both require that month is a number rather than a string.
--
Mats