You are here: Re: Calculating week range from specific date - Any functions? « PHP Programming Language « IT news, forums, messages
Re: Calculating week range from specific date - Any functions?

Posted by Adam Harvey on 05/10/05 11:09

On Fri, 06 May 2005 17:44:26 +0100, Dave Smithz wrote:
> I am sure this has been asked before but it is difficult to search for.
> Given a date, is there a function or a already written script out there that
> will allow my to get the previous Monday before the date given?

If $ts is a UNIX timestamp for the date you want to use, the following
should put the right timestamp into $monday:

$monday = strtotime('last monday', $ts);

Adam

--
Adam Harvey
Optimiser Pty Ltd

To e-mail: don't make an example out of me!

 

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

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