pe I added something valueable ;)
-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 3:18 AM
To: 'J Morton'; Shew; [EMAIL PROTECTED]
Subject: RE: [PHP] date brain teaser
How about something similar, but look for the first Friday and then add
seven
Hi Justin,
Most Xcellent. Thanks alot!!!
Shew
"J Morton" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Sorry I had a parentheses out of place, it should have been:
>
> $this_date = "1/1/2003";
>
> for($i=1; $i<=365; $i++) {
> if (date("l", strtotime($this_date)) == "Friday")
How about something similar, but look for the first Friday and then add
seven days (or 604800 seconds) to get the date of the next Friday?
-Original Message-
From: J Morton [mailto:[EMAIL PROTECTED]
Sent: Friday, 3 October 2003 11:20 AM
To: Shew; [EMAIL PROTECTED]
Subject: Re: [PHP] date
Sorry I had a parentheses out of place, it should have been:
";
}
$this_date = date("n/j/Y",mktime(0,0,0,date("m",
strtotime($this_date)),date("d", strtotime($this_date))+1,date("Y",
strtotime($this_date;
}
?>
Hope this helps,
Justin
Shew wrote:
> Hi,
>
> I'm trying to find a formu
Sure --
";
}
$this_date = date("n/j/Y",mktime(0,0,0,date("m",
strtotime($this_date)),date("d", strtotime($this_date))+1,date("Y",
strtotime($this_date;
}
?>
Shew wrote:
> Hi,
>
> I'm trying to find a formula for displaying the date for every Friday of a
> given year, i.e. 2003
>
>
5 matches
Mail list logo