|
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]
|