Re: [PHP] $date("l-m");

2005-06-05 Thread Jochem Maas
John Taylor-Johnston wrote: $mydata->lastinsalled = "2004-05"; take a good look at mktime(); How can I determne if $mydata->lastinsalled is one year or more older than the current $date("l-m"); Anyting simple and over looked? I have been browsing the manual:: http://ca.php.net/manual/en/f

Re: [PHP] $date("l-m");

2005-06-04 Thread Sebastian
is it possible for $mydata->lastinsalled to have -MM-DD format? ie: 2004-05-31 you can use strtotime to convert it to unix timestamp to compare...something like this: $stamp = strtotime('2004-06-31'); // $mydata->lastinsalled if($stamp >= strtotime('1 year ago')) { echo 'less than 1 y

[PHP] $date("l-m");

2005-06-04 Thread John Taylor-Johnston
$mydata->lastinsalled = "2004-05"; How can I determne if $mydata->lastinsalled is one year or more older than the current $date("l-m"); Anyting simple and over looked? I have been browsing the manual:: http://ca.php.net/manual/en/function.strtotime.php http://ca.php.net/manual/en/function.date