From 10251dc1827b6a070b131f017cfde1b685dc094e Mon Sep 17 00:00:00 2001 From: "BenderBlog \"SuperBart\" Rodriguez" Date: Mon, 22 Jan 2024 17:12:49 +0800 Subject: [PATCH 1/3] Update zh_locale.dart --- lib/src/locale/locales/zh_locale.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/locale/locales/zh_locale.dart b/lib/src/locale/locales/zh_locale.dart index 2e2e079..91d75b8 100644 --- a/lib/src/locale/locales/zh_locale.dart +++ b/lib/src/locale/locales/zh_locale.dart @@ -20,6 +20,11 @@ class ZhCnLocale extends ZhLocale { @override String code() => 'zh_cn'; + /// Per https://www.unicode.org/cldr/charts/42/supplemental/territory_information.html + /// China First day of week is monday + @override + StartOfWeek startOfWeek() => StartOfWeek.monday; + @override RelativeDateTime relativeDateTime() => ZhCnRelativeTime(); } From 731972ad1908819e5636845f6566f980c1954456 Mon Sep 17 00:00:00 2001 From: Jama Mohamed Date: Mon, 22 Jan 2024 19:36:48 +0300 Subject: [PATCH 2/3] Update test --- test/src/locale/locales/locales_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/locale/locales/locales_test.dart b/test/src/locale/locales/locales_test.dart index dabde2d..cd6c72b 100644 --- a/test/src/locale/locales/locales_test.dart +++ b/test/src/locale/locales/locales_test.dart @@ -184,7 +184,7 @@ List> localesTestData() { 'locale': ZhLocale(), 'code': 'zh', 'ordinals': ['日', '日', '日', '日'], - 'startOfWeek': StartOfWeek.sunday, + 'startOfWeek': StartOfWeek.monday, 'relativeTime': ZhRelativeTime() }, { From 820a0546ffa79e91d0f8512f8698537cb6bf9a31 Mon Sep 17 00:00:00 2001 From: Jama Mohamed Date: Mon, 22 Jan 2024 19:46:01 +0300 Subject: [PATCH 3/3] Update test --- test/src/locale/locales/locales_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/src/locale/locales/locales_test.dart b/test/src/locale/locales/locales_test.dart index cd6c72b..a44d18d 100644 --- a/test/src/locale/locales/locales_test.dart +++ b/test/src/locale/locales/locales_test.dart @@ -184,14 +184,14 @@ List> localesTestData() { 'locale': ZhLocale(), 'code': 'zh', 'ordinals': ['日', '日', '日', '日'], - 'startOfWeek': StartOfWeek.monday, + 'startOfWeek': StartOfWeek.sunday, 'relativeTime': ZhRelativeTime() }, { 'locale': ZhCnLocale(), 'code': 'zh_cn', 'ordinals': ['日', '日', '日', '日'], - 'startOfWeek': StartOfWeek.sunday, + 'startOfWeek': StartOfWeek.monday, 'relativeTime': ZhCnRelativeTime() }, {