note 32287 deleted from function.mktime by vincent
| From: | vincent@php.net | Date: | Thu, 11 Sep 2003 20:40:48 +0000 |
| Subject: | note 32287 deleted from function.mktime by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-56254@lists.php.net to get a copy of this message | ||
Note Submitter: admin@jamuk.com
----
A one line way to find the timestamp of the beginning of the previous Monday:
mktime( 0, 0 ,0 ,date("m"), date("d")+(((date("w")==0) ? -7 :
(-1*date("w"))) + 1), date("Y") ) ;
Very handy for business reporting, especially when used in conjunction with date().