Date bug... maybe

From: Date: Sun, 29 Jun 2003 09:25:41 +0000
Subject: Date bug... maybe
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6304@lists.php.net to get a copy of this message
Date ... add span bug getDay format seems to go from format 01, 02, 03.... to format 1, 2, 3.... after the add span i fixed the bug just by adding >>> if (strlen($this->day) == 1) $this->day = "0".$this->day; <<< to the bottom of Date::addSpan(); below is a script i wrote to show the possible bug <?php include_once("Date.php"); $testdate = new Date("2003-01-01 00:00:00"); echo "Day before add span: ".$testdate->getDay(); // Add span $testdate->addSpan(new Date_Span("2","%d")); echo "<BR>Date after add span: ".$testdate->getDay(); ?>

« previous php.pear.general (#6304) next »