note 71017 deleted from function.strtotime by derick

From: Date: Sun, 08 Apr 2007 12:58:44 +0000
Subject: note 71017 deleted from function.strtotime by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-125205@lists.php.net to get a copy of this message
Note Submitter: mirko.it ---- hi, a solution of the PrevMonth and NextMonth problem could be ($this->dateView is your date): function actionViewPrevMonth() { $iMonthTmp = intval(date("m", $this->dateView)); while (intval(date("m", strtotime("-1 month", $this->dateView))) == $iMonthTmp) { $this->dateView -= _SecondsInDay; } $this->dateView = strtotime("-1 month", $this->dateView); } function actionViewNextMonth() { while (intval(date("m", strtotime("+1 month", $this->dateView))) > (intval(date("m", $this->dateView)) + 1)) { $this->dateView -= _SecondsInDay; } $this->dateView = strtotime("+1 month", $this->dateView); } bye mirko

« previous php.notes (#125205) next »