You are here: Re: Finding Nearest Friday « All PHP « IT news, forums, messages
Re: Finding Nearest Friday

Posted by Norman Peelman on 10/02/06 23:08

<jferree@gmail.com> wrote in message
news:1159828613.659706.301710@h48g2000cwc.googlegroups.com...
> If given a date such as
>
> 12-05-2005
>
> How can I find the closest Friday which would be
> 12-02-2005
>
> Thanks for any help
>
> Jim
>

$timestamp = mktime(0,0,0,$month,$day,$year);
$lastFriday = date("m-d-Y",strtotime("last Friday",$timestamp));

Norm
www.php.net

 

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

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