Re: No is_date() function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Lars

I saw that one already but unfortunately, it doesn't help as it requires 3 inputs . What I'm shooting for is an 'is_date' function that returns true or false with no prior knowledge of what a variable might contain.

Ken

On Jul 25, 2007, at 10:08 AM, Lars Haßler wrote:

Hi,

there is a function to check a valid date: http://de3.php.net/ manual/de/function.checkdate.php

may help
Hi

I wrote a serialization function to turn arbitrary PHP variables into Macintosh plist compatible XML but see that there is no "is_date" tester as there is for bool, object, array etc. Is there a relatively simple (and robust) way to detect if a variable is a date? For example:

$person = array('name'=>'bob', 'sex'=>'male', 'date_of_birth'=> $someDateHere);

Thanks for any help

Ken


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux