PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The string to parse, according to the GNU » Date Input Formats syntax. Before PHP 5.0.0, microseconds weren't allowed in the time, since PHP 5.0.0 they are allowed but ignored.
If it returns false, then the given date is not valid or not in valid format.
There are 10 types of people in this world, those who understand binary and those who don't
Personally I try and deal with dates in terms of intergers only...it makes comparison faster and less headaches.
If you are accepting a formatted date with a FORM input control you might want to reconsider and use a date picker widget or series of comboboxes -- if accessibility (no script) is important to you.
This way you can assume the input to be of a certain format and just change it to an integer to check it's validity.