| Newsgroups |
php.notes |
| Message-ID |
<[email protected]> |
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