Reply to Re: strtotime a2038

Your name:

Reply:


Posted by Anthony Smith on 01/08/08 15:51

On Jan 8, 5:08 am, Janwillem Borleffs <j...@jwscripts.com> wrote:
> Anthony Smith schreef:
>
> > So, after doing some research I finally figured that php chokes on
> > dates past year 2525. In this web service that I use they often use
> > 2525-05-31 as the expiration date. I want to determine how I can
> > convert this in a format to compare it with other dates.
>
> > Before I was trying this:
>
> > if (strtotime($territory->expirationDate) < strtotime("2008-01-01")){
> > /do something
> > }
>
> > but since $territory->expirationDate really equals 2525-05-31 it was
> > not working...
>
> > What is a nice clean way to solve this problem?
>
> You could simply do:
>
> if (strtotime($territory->expirationDate) >= 2038) {
> // do something
>
> }
>
> JW

But I need to compare the entire date. They could be the same year.

[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

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