cvs: pear /Date Date.php
| From: | Pierre-Alain Joye | Date: | Sun, 02 Oct 2005 14:07:00 +0000 |
| Subject: | cvs: pear /Date Date.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35218@lists.php.net to get a copy of this message | ||
pajoye Sun Oct 2 10:07:00 2005 EDT
Modified files:
/pear/Date Date.php
Log:
- #3022, allow to specify the weekday abbrevation length used in ::format()
keeping BC
http://cvs.php.net/diff.php/pear/Date/Date.php?r1=1.32&r2=1.33&ty=u
Index: pear/Date/Date.php
diff -u pear/Date/Date.php:1.32 pear/Date/Date.php:1.33
--- pear/Date/Date.php:1.32 Sun Oct 2 09:59:55 2005
+++ pear/Date/Date.php Sun Oct 2 10:06:59 2005
@@ -23,7 +23,7 @@
* @author Pierre-Alain Joye <pajoye@php.net>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/2_02.txt PHP License
- * @version CVS: $Id: Date.php,v 1.32 2005/10/02 13:59:55 pajoye Exp $
+ * @version CVS: $Id: Date.php,v 1.33 2005/10/02 14:06:59 pajoye Exp $
* @link http://pear.php.net/package/Date
*/
@@ -115,12 +115,20 @@
* @var float
*/
var $partsecond;
+
/**
* timezone for this date
* @var object Date_TimeZone
*/
var $tz;
+ /**
+ * define the default weekday abbreviation length
+ * used by ::format()
+ * @var int
+ */
+ var $getWeekdayAbbrnameLength = 3;
+
/**
* Constructor
@@ -320,7 +328,7 @@
$nextchar = substr($format,$strpos + 1,1);
switch ($nextchar) {
case "a":
- $output .=
Date_Calc::getWeekdayAbbrname($this->day,$this->month,$this->year);
+ $output .=
Date_Calc::getWeekdayAbbrname($this->day,$this->month,$this->year,
$this->getWeekdayAbbrnameLength);
break;
case "A":
$output .=
Date_Calc::getWeekdayFullname($this->day,$this->month,$this->year);