Re: All Monday's & Thursdays
- From: "Janwillem Borleffs" <jw@xxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 12:12:14 +0200
Stuart Colman wrote:
Janwillem,
Thanks for that, almost there. Your code outputs the following:
2006 Jun Thu (01)
2006 Jun Mon (12)
2006 Jun Thu (15)
2006 Jun Mon (26)
2006 Jun Thu (29)
There are a few dates missing from the list, such as Mon 5th, Thu
8th, Mon 19th and Thu 22.
Any ideas how to get these values too?
When I run the code on a Windows and a Linux box, I get the expected list:
2006 Jun Thu (01)
2006 Jun Mon (05)
2006 Jun Thu (08)
2006 Jun Mon (12)
2006 Jun Thu (15)
2006 Jun Mon (19)
2006 Jun Thu (22)
2006 Jun Mon (26)
2006 Jun Thu (29)
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.
Removing "next" should fix it:
$ts = strtotime('monday', $ts);
JW
.
- Follow-Ups:
- Re: All Monday's & Thursdays
- From: Janwillem Borleffs
- Re: All Monday's & Thursdays
- From: Stuart
- Re: All Monday's & Thursdays
- References:
- All Monday's & Thursdays
- From: Stuart Colman
- Re: All Monday's & Thursdays
- From: Janwillem Borleffs
- Re: All Monday's & Thursdays
- From: Janwillem Borleffs
- Re: All Monday's & Thursdays
- From: Stuart Colman
- All Monday's & Thursdays
- Prev by Date: Re: Why php ?
- Next by Date: Re: All Monday's & Thursdays
- Previous by thread: Re: All Monday's & Thursdays
- Next by thread: Re: All Monday's & Thursdays
- Index(es):
Relevant Pages
|