summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c2
1 files changed, 1 insertions, 1 deletions
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 */