You are here: Re: Options for Validating a Date Value? « PHP Programming Language « IT news, forums, messages
Re: Options for Validating a Date Value?

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?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация