I did similiar posting about finding the last day of the month last week and got some response. So, I'll just post some clipping from php.net for you. If your machine support the php mktime() then you're in for luck. You can find more info about it at php.net with the function, date() and mktime().
--snip-- //To find out the last day of the month echo date ("M-d-Y", mktime (0,0,0,12,32,1997)); --snip-- Scott F. "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Howdy, Has anyone written any date validation function or sequence. I have looked around, but haven't found anything. I am cobbling togather something, but was hoping to not have to re-invent the wheel. The date is formatted YYYYMMDD and is input by the user; $userCentury = substr($userDate, 0, 2); //must be 20 (no problem) $userYear = substr($userDate, 2, 2); //must be 03 or better $userMonth = substr($userDate, 4, 2); // 01-12 $userDay = substr($userDate, 6, 2); // 01-31 It doesn't matter if the month is 02 and they have entered 31 as the day. If any one of the four conditions is not true it gives them a warning. Anyone done this before? Thanks! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php