You are here: Re: All Monday's & Thursdays « All PHP « IT news, forums, messages
Re: All Monday's & Thursdays

Posted by Janwillem Borleffs on 06/30/06 20:20

Janwillem Borleffs wrote:
> On a FreeBSD box, however, I get the shortened list. The problem
> appears to be in this line:
>
> $ts = strtotime('next monday', $ts);
>
> On Windows and Linux, you will actually get the next monday, while on
> FreeBSD (and perhaps also on other OS's) it will just skip it.
>

Not related to the OS, but to the PHP version applied; per example, with PHP
5.1.2, when today's Friday and you pass strtotime "next friday", it will not
return the current Friday, but the first following Friday instead. With PHP
4.4.0, you will get today.

Reading through bugs.php.net, it appears that the formal behaviour is the
one implemented from now on, to follow both the documentation and the
originating library more closely.

So, the suggested fix (i.e. removing the "next" keyword) remains.


JW

 

Navigation:

[Reply to this 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

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