Re: date brain teaser [fix]
| From: | Shew | Date: | Fri, 03 Oct 2003 01:48:26 +0000 |
| Subject: | Re: date brain teaser [fix] | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164839@lists.php.net to get a copy of this message | ||
Hi Justin,
Most Xcellent. Thanks alot!!!
Shew
"J Morton" <jwm@justinmorton.com> wrote in message
news:3F7CCF44.F0F2DF54@justinmorton.com...
> 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") {
> echo $this_date . "<br>";
> }
>
> $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 formula for displaying the date for every Friday of
a
> > given year, i.e. 2003
> >
> > Jan 3, 2003
> > Jan 10, 2003
> > Jan 17, 2003
> > etc.
> >
> > Any ideas?
> >
> > Thanks
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php