Re: comparing dates

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

 



Is there a quick way to compare dates in the format dd/mm/yy without
exploding and comparing the individual parts?

Compare them in what way?  Before, after, days between?

In any case, i'd look at strtotime() to convert them into timestamps, then diff them to get the number of seconds b/n them, then go from there.

If strtotime() won't do it because it expects mm/dd/yy (consider 01/02/05 is that feb 1st or jan 2nd?) then split up the string and use mktime().

good luck.

--
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