Read in a row (using [man]fgetcsv/man, of course), check if the date field is within any of those ranges and if it isn't, then skip that row (e.g. [man]continue[/man]).
That's the general outline... was there a specific part you didn't know how to do?