note 35839 added to function.mktime
| From: | bruno dot denis at parisfree dot com | Date: | Tue, 16 Sep 2003 15:46:09 +0000 |
| Subject: | note 35839 added to function.mktime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-56578@lists.php.net to get a copy of this message | ||
Why do complex while easier (instead of mktime blablabla (DOES NOT WORK < 69))
Warning : Date in European format (change tab[x]) to make it work where required.
function age($date1)
{
$tab1 = explode('.', $date1);
$tab2 = date("Y");
$age = $tab2-$tab1[2];
if ((date("m") < $tab1[1]) && (date("d") <= $tab1[0])) $age--;
return $age;
}
----
Manual Page -- http://www.php.net/manual/en/function.mktime.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35839
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35839&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35839&report=yes