Reply to Re: strtotime() pre-1970 ?

Your name:

Reply:


Posted by Baron Samedi on 12/16/56 11:59

Markus Ernst wrote:
> 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

Thanks, that wokred a treat!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация