cvs: php4 /pear/Date Calc.php

From: Date: Wed, 22 Nov 2000 14:21:42 +0000
Subject: cvs: php4 /pear/Date Calc.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2732@lists.php.net to get a copy of this message
mohrt Wed Nov 22 06:21:42 2000 EDT Modified files: /php4/pear/Date Calc.php Log: fixed bug in endOfPrevMonth(), endOfNextMonth() Index: php4/pear/Date/Calc.php diff -u php4/pear/Date/Calc.php:1.8 php4/pear/Date/Calc.php:1.9 --- php4/pear/Date/Calc.php:1.8 Tue Nov 21 08:03:16 2000 +++ php4/pear/Date/Calc.php Wed Nov 22 06:21:42 2000 @@ -24,7 +24,7 @@ * * @access public * - * @version 1.2.1 + * @version 1.2.2 * @author Monte Ohrt <monte@ispi.net> */ @@ -358,7 +358,6 @@ if(empty($day)) $day = Date_Calc::dateNow("%d"); - $day = Date_Calc::daysInMonth($month,$year); if($month < 12) { @@ -370,6 +369,8 @@ $month=1; } + $day = Date_Calc::daysInMonth($month,$year); + return Date_Calc::dateFormat($day,$month,$year,$format); } // end func endOfNextMonth @@ -434,8 +435,6 @@ if(empty($day)) $day = Date_Calc::dateNow("%d"); - $day = Date_Calc::daysInMonth($month,$year); - if($month > 1) { $month--; @@ -445,6 +444,8 @@ $year--; $month=12; } + + $day = Date_Calc::daysInMonth($month,$year); return Date_Calc::dateFormat($day,$month,$year,$format);

« previous php.cvs (#2732) next »