diff options
author | Derick Rethans <derick@php.net> | 2005-08-30 09:17:09 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2005-08-30 09:17:09 +0000 |
commit | 0e2491f5534b7a3de71e26f9b68502694e943512 (patch) | |
tree | 61e3de4f9c172694548b8868b3a1c0d4bc2e0b41 | |
parent | cf39bec44719d27fa4389b4a8484134f6913e59b (diff) | |
download | php-git-0e2491f5534b7a3de71e26f9b68502694e943512.tar.gz |
- Fixed bug #34302 (date('W') do not return leading zeros for week 1 to 9).
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/date/php_date.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -14,6 +14,8 @@ PHP NEWS - Fixed "make test" to work for phpized extensions. (Hartmut, Jani) - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems. (Andrey) +- Fixed bug #34302 (date('W') do not return leading zeros for week 1 to 9). + (Derick) - Fixed bug #34299 (ReflectionClass::isInstantiable() returns true for abstract classes). (Marcus) - Fixed bug #34284 (CLI phpinfo showing html on _SERVER["argv"]). (Jani) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 16e6ce806d..05eb26f588 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -392,7 +392,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca case 'z': snprintf(buffer, 32, "%d", (int) timelib_day_of_year(t->y, t->m, t->d)); break; /* week */ - case 'W': snprintf(buffer, 32, "%d", (int) isoweek); break; /* iso weeknr */ + case 'W': snprintf(buffer, 32, "%02d", (int) isoweek); break; /* iso weeknr */ case 'o': snprintf(buffer, 32, "%d", (int) isoyear); break; /* iso year */ /* month */ |