diff options
author | Derick Rethans <derick@php.net> | 2005-08-30 09:15:58 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2005-08-30 09:15:58 +0000 |
commit | cdc11d0f49069e6502da0281719357e73b2a9e57 (patch) | |
tree | a26cd8377a9bd43684d1f9c9b70d9331945de19d | |
parent | 42ebe9efb2eb79fc9176eec60fec9dd2b96380b2 (diff) | |
download | php-git-cdc11d0f49069e6502da0281719357e73b2a9e57.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/standard/datetime.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -21,6 +21,8 @@ PHP NEWS - Fixed segfaults when CURL callback functions throw exception. (Tony) - Fixed various reentrancy bugs in user-sort functions, solves bugs #33286 and #33295. (Mike Bretz) +- 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 #34078 (Reflection API problems in methods with boolean or diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index 3ac1b7c476..b0a42ae5a8 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -657,7 +657,7 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int gm) wk = (yd + 6 - wd + fd) / 7 - (fd > 3); } - sprintf(tmp_buff, "%d", wk); /* SAFE */ + sprintf(tmp_buff, "%02d", wk); /* SAFE */ strcat(Z_STRVAL_P(return_value), tmp_buff); break; |