note 102713 added to function.date
| From: | bsntech at osu1 dot php dot net | Date: | Tue, 01 Mar 2011 21:37:17 +0000 |
| Subject: | note 102713 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177468@lists.php.net to get a copy of this message | ||
Found it useful to do some quick calculations on a date by doing something like this.
$var = date('F d, Y', strtotime("-1 month -4 days"));
This quickly returns something like this:
February 28, 2011
But, it will return the date that was one month and four days from the current date. Easy to get
calculations based on that especially in cases where there are not 31 days in a month.
Brian S.
BsnTech Networks
http://www.bsntech.com
----
Server IP: 208.69.120.55
Probable Submitter: 98.214.209.29
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/102713
Del: integrated -- https://master.php.net/note/delete/102713/integrated
Del: useless -- https://master.php.net/note/delete/102713/useless
Del: bad code -- https://master.php.net/note/delete/102713/bad+code
Del: spam -- https://master.php.net/note/delete/102713/spam
Del: non-english -- https://master.php.net/note/delete/102713/non-english
Del: in docs -- https://master.php.net/note/delete/102713/in+docs
Del: other reasons-- https://master.php.net/note/delete/102713
Reject -- https://master.php.net/note/reject/102713
Search -- https://master.php.net/manage/user-notes.php