strtotime() pre-1970 ?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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.

Re: strtotime() pre-1970 ?

Baron Samedi schrieb:
Quoted text here. Click to load it

Have a look at the safestrtotime() function suggested in the user  
contributed notes in the PHP manual:


Re: strtotime() pre-1970 ?

Markus Ernst wrote:
Quoted text here. Click to load it

Thanks, that wokred a treat!

Site Timeline