From 14162252f40debd51467edfd38576570cf7a7f28 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Thu, 4 Sep 2014 22:29:26 +0100 Subject: [PATCH] Fixes #67960 - Long/short day names reversed in jddayofweek() --- ext/calendar/calendar.c | 6 +++--- ext/calendar/tests/jddayofweek.phpt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index 173cf076e1760..2b6705507e4cc 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -208,7 +208,7 @@ static struct cal_entry_t cal_conversion_table[CAL_NUM_CALS] = { #define JEWISH_HEB_MONTH_NAME(year) ((monthsPerYear[((year)-1) % 19] == 13)?JewishMonthHebNameLeap:JewishMonthHebName) /* For jddayofweek */ -enum { CAL_DOW_DAYNO, CAL_DOW_SHORT, CAL_DOW_LONG }; +enum { CAL_DOW_DAYNO, CAL_DOW_LONG, CAL_DOW_SHORT }; /* For jdmonthname */ enum { CAL_MONTH_GREGORIAN_SHORT, CAL_MONTH_GREGORIAN_LONG, @@ -694,10 +694,10 @@ PHP_FUNCTION(jddayofweek) daynames = DayNameShort[day]; switch (mode) { - case CAL_DOW_SHORT: + case CAL_DOW_LONG: RETURN_STRING(daynamel); break; - case CAL_DOW_LONG: + case CAL_DOW_SHORT: RETURN_STRING(daynames); break; case CAL_DOW_DAYNO: diff --git a/ext/calendar/tests/jddayofweek.phpt b/ext/calendar/tests/jddayofweek.phpt index c33d59892d1dd..c5647804bbf3d 100644 --- a/ext/calendar/tests/jddayofweek.phpt +++ b/ext/calendar/tests/jddayofweek.phpt @@ -6,7 +6,7 @@ jddayofweek()