note 47405 deleted from function.strtotime by derick
| From: | derick@php.net | Date: | Sun, 14 Aug 2005 11:50:02 +0000 |
| Subject: | note 47405 deleted from function.strtotime by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-93592@lists.php.net to get a copy of this message | ||
Note Submitter: aripollak at gmail dot com
----
To find the last Friday of the current month (when Date::Calc::NWeekdayOfMonth isn't
available):
<?php
$nextmonth = strftime("%B %Y", strtotime("+1 month"));
$lastfriday = strtotime("-1 week friday", strtotime("1 $nextmonth")) + 43200;
print strftime('%B %d, %Y', $lastfriday);
?>