Posted by Gordon Burditt on 11/24/07 21:40
>What about first converting the integer to a date using the "date"
>function. From here you can see if it validates to a real date by
>using PHP's built-in "checkdate" function, and then go from there. You
I believe this check will *always* pass if the number fits in a 32-bit
integer, rendering the check somewhat pointless.
Do you have any additional constraints on this date other than that
it's a valid date? Like it's supposed to be in the future, in the
past, or reasonably close (e.g. within a year) of the current time?
[Back to original message]
|