|
Posted by Markus Ernst on 09/26/06 10:29
Baron Samedi schrieb:
> if I code
>
> $birth = strtotime('1 April 1950');
>
> then $birth = -1, I guess that this is because time "began" on 1st Jan,
> 1970. (although I seem to remember a few good times before that).
>
> So, what's the easiest way to find out how many days old I am (exactly,
> please, not just taking 1 April 1970 and adding 20 *365, which does not
> account for leap years?)
>
> Thanks in advance.
>
Have a look at the safestrtotime() function suggested in the user
contributed notes in the PHP manual:
http://ch2.php.net/manual/de/function.strtotime.php#54564
HTH
Markus
Navigation:
[Reply to this message]
|