Re: Last Friday of every month

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 14, 2008 at 11:57 AM, tedd <tedd.sperling@xxxxxxxxx> wrote:
> At 8:17 AM -0400 3/14/08, Eric Butera wrote:
>  >
>  >Just FYI you can use the word "last friday" in strtotime.  So really
>  >you could check and see if the max day in a month is a friday and if
>  >not fall back on last friday.  I didn't test it but I just thought I'd
>  >throw that out there.
>  >
>  >erics:~ eric$ php -r "echo date('n/j/Y', strtotime('last friday'));"
>  >3/7/2008
>
>  Eric:
>
>  When I read that, I went "Na, that can't be right" -- so I checked it.
>
>  You were right -- here it is:
>
>  http://webbytedd.com/b1/last-friday/
>
>  Thanks for the suggestion.
>
>  Cheers,
>
>  tedd
>  --
>  -------
>  http://sperling.com  http://ancientstones.com  http://earthstones.com
>
>
>
>  --
>  PHP General Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Hi Tedd,

Thanks for the writeup!  You could streamline that a bit by using
getdate() and using the returned array values.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux