If you want to validate
dates only, the examples and suggestions given above are OK, but if you include the
time part as well, things get all of a sudden much more complicated as at some moments second(s) have been added to make up for the Earth's irregular motion (look at it as some sort of Julian/Gregorian jump, but for seconds only) and if you wish to check for that, it gets very complicated!
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law