note 71018 deleted from function.strtotime by derick
| From: | derick@php.net | Date: | Sun, 08 Apr 2007 12:58:37 +0000 |
| Subject: | note 71018 deleted from function.strtotime by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-125204@lists.php.net to get a copy of this message | ||
Note Submitter:
----
similary, PrevYear and NextYear will be:
function actionViewPrevYear() {
$iMonthTmp = intval(date("m", $this->dateView));
while (intval(date("m", strtotime("-1 year", $this->dateView))) !=
$iMonthTmp) {
$this->dateView -= _SecondsInDay;
}
$this->dateView = strtotime("-1 year", $this->dateView);
}
function actionViewNextYear() {
while (intval(date("m", strtotime("+1 year", $this->dateView))) >
(intval(date("m", $this->dateView)))) {
$this->dateView -= _SecondsInDay;
}
$this->dateView = strtotime("+1 year", $this->dateView);
}
keywords: dateadd datesub add_date sub_date adddate subdate addmonth submonth addyear subyear
mirko
P.S.:
define("_SecondsInDay", 86400);