Skip to content

Commit

Permalink
Fixes: NB#288618 - Calendar, Weekdays has wrong order according to KE…
Browse files Browse the repository at this point in the history
… countries calendar

RevBy: Berthold Krevert

Details:

Make week data for Kenya agree to the latest upstream data from

http://unicode.org/cldr/trac/browser/trunk/common/supplemental/supplementalData.xml

According to that, Kenya (KE) has firstDay day="sun", weekendStart
day="sat", weekendEnd day="sun", minDays count="1", i.e. everything
the same as the USA (US).
  • Loading branch information
Mike FABIAN committed Dec 6, 2011
1 parent 7ba205e commit 903feb0
Show file tree
Hide file tree
Showing 18 changed files with 243 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/icu-extradata/data/dav_KE.txt
@@ -0,0 +1,8 @@
dav_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/ebu_KE.txt
@@ -0,0 +1,8 @@
ebu_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/guz_KE.txt
@@ -0,0 +1,8 @@
guz_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/kam_KE.txt
@@ -0,0 +1,8 @@
kam_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/ki_KE.txt
@@ -0,0 +1,8 @@
ki_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/kln_KE.txt
@@ -0,0 +1,8 @@
kln_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/luo_KE.txt
@@ -0,0 +1,8 @@
luo_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/luy_KE.txt
@@ -0,0 +1,8 @@
luy_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/mas_KE.txt
@@ -0,0 +1,8 @@
mas_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/mer_KE.txt
@@ -0,0 +1,8 @@
mer_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/om_KE.txt
@@ -0,0 +1,8 @@
om_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/saq_KE.txt
@@ -0,0 +1,8 @@
saq_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/so_KE.txt
@@ -0,0 +1,8 @@
so_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/sw_KE.txt
@@ -0,0 +1,8 @@
sw_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
8 changes: 8 additions & 0 deletions src/icu-extradata/data/teo_KE.txt
@@ -0,0 +1,8 @@
teo_KE{
calendar{
gregorian{
DateTimeElements:intvector { 1, 1 }
weekend:intvector { 7, 0, 1, 86400000 }
}
}
}
17 changes: 16 additions & 1 deletion src/icu-extradata/icu-extradata.pro
Expand Up @@ -71,7 +71,22 @@ greaterThan(ICUVERSION, 4.4) {
data/zh_TW.txt \
data/zh_Hant_TW.txt \
data/ar_LB.txt \
data/ar_IQ.txt
data/ar_IQ.txt \
data/dav_KE.txt \
data/ebu_KE.txt \
data/guz_KE.txt \
data/kam_KE.txt \
data/ki_KE.txt \
data/kln_KE.txt \
data/luo_KE.txt \
data/luy_KE.txt \
data/mas_KE.txt \
data/mer_KE.txt \
data/om_KE.txt \
data/saq_KE.txt \
data/so_KE.txt \
data/sw_KE.txt \
data/teo_KE.txt

greaterThan(ICUVERSION, 4.5) {
LOCALESTXT += data46/ar.txt \
Expand Down
3 changes: 2 additions & 1 deletion tests/ft_locales/ft_locales.cpp
Expand Up @@ -4282,6 +4282,7 @@ void Ft_Locales::checkAvailableLocales()
requiredLocaleNames << "sv"; // "Swedish"
requiredLocaleNames << "sv_FI"; // "Swedish (Finland)"
requiredLocaleNames << "sv_SE"; // "Swedish (Sweden)"
requiredLocaleNames << "sw_KE"; // "Swahili (Kenya)"
requiredLocaleNames << "th"; // "Thai"
requiredLocaleNames << "th_TH"; // "Thai (Thailand)"
requiredLocaleNames << "tr"; // "Turkish"
Expand Down Expand Up @@ -4354,7 +4355,7 @@ void Ft_Locales::checkAvailableLocales()
supportedLocaleNames << "zh_CN@collation=stroke";
supportedLocaleNames << "ko_KR";
supportedLocaleNames << "kk_KZ";
bool runFullTest = false;
bool runFullTest = true;
if (!runFullTest) {
supportedLocaleNames.clear();
supportedLocaleNames << "ar_SA"; // "Arabic (Saudi Arabia)"
Expand Down
105 changes: 105 additions & 0 deletions tests/ut_mcalendar/ut_mcalendar.cpp
Expand Up @@ -5835,6 +5835,111 @@ void Ut_MCalendar::testWeekdayType_data()
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("sw_KE")
<< "sw_KE"
<< "sw_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("dav_KE")
<< "dav_KE"
<< "dav_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("ebu_KE")
<< "ebu_KE"
<< "ebu_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("guz_KE")
<< "guz_KE"
<< "guz_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("kam_KE")
<< "kam_KE"
<< "kam_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("ki_KE")
<< "ki_KE"
<< "ki_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("kln_KE")
<< "kln_KE"
<< "kln_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("luo_KE")
<< "luo_KE"
<< "luo_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("luy_KE")
<< "luy_KE"
<< "luy_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("mas_KE")
<< "mas_KE"
<< "mas_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("mer_KE")
<< "mer_KE"
<< "mer_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("om_KE")
<< "om_KE"
<< "om_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("saq_KE")
<< "saq_KE"
<< "saq_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("so_KE")
<< "so_KE"
<< "so_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
QTest::newRow("teo_KE")
<< "teo_KE"
<< "teo_KE"
<< MLocale::GregorianCalendar
<< 7
<< 0 << 0 << 0 << 0 << 0 << 1 << 3
<< -1 << -1 << -1 << -1 << -1 << 0 << 86400000;
}

void Ut_MCalendar::testWeekdayType()
Expand Down

0 comments on commit 903feb0

Please sign in to comment.