derick Tue Aug 30 05:17:56 2005 EDT Modified files: /php-src NEWS /php-src/ext/date php_date.c Log: - Fixed bug #34302 (date('W') do not return leading zeros for week 1 to 9). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2047&r2=1.2048&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2047 php-src/NEWS:1.2048 --- php-src/NEWS:1.2047 Fri Aug 26 08:50:01 2005 +++ php-src/NEWS Tue Aug 30 05:17:56 2005 @@ -13,3 +13,5 @@ the part of haystack before or after first occurence of needle. (Johannes) - Fixed a bug where stream_get_meta_data() did not return the "uri" element for files opened with tmpname(). (Derick) +- Fixed bug #34302 (date('W') do not return leading zeros for week 1 to 9). + (Derick) http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.48&r2=1.49&ty=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.48 php-src/ext/date/php_date.c:1.49 --- php-src/ext/date/php_date.c:1.48 Wed Aug 24 13:16:14 2005 +++ php-src/ext/date/php_date.c Tue Aug 30 05:17:56 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.48 2005/08/24 17:16:14 andrei Exp $ */ +/* $Id: php_date.c,v 1.49 2005/08/30 09:17:56 derick Exp $ */ #include "php.h" #include "php_streams.h" @@ -492,7 +492,7 @@ case 'z': length = date_spprintf(&buffer, 32 TSRMLS_CC, "%d", (int) timelib_day_of_year(t->y, t->m, t->d)); break; /* week */ - case 'W': length = date_spprintf(&buffer, 32 TSRMLS_CC, "%d", (int) isoweek); break; /* iso weeknr */ + case 'W': length = date_spprintf(&buffer, 32 TSRMLS_CC, "%0d", (int) isoweek); break; /* iso weeknr */ case 'o': length = date_spprintf(&buffer, 32 TSRMLS_CC, "%d", (int) isoyear); break; /* iso year */ /* month */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php