From 9238d524bb73c3e6b80bd8b1853fb63387cf4580 Mon Sep 17 00:00:00 2001 From: Goun Lee Date: Wed, 26 Aug 2020 18:17:16 +0900 Subject: [PATCH 1/8] Add testcases to verify my-MM --- js/test/date/testDayOfWeek.js | 10 +++ js/test/date/testMeridiems.js | 10 +++ js/test/date/testMonthTranslation.js | 45 +++++++++++ js/test/date/testWeekdayTranslation.js | 71 ++++++++++++++++++ js/test/date/testcalendar.js | 4 +- js/test/date/testclock.js | 9 +++ js/test/date/testdatetimefmt.js | 26 +++++++ .../daterange/testdatefmtrange_fmttemplate.js | 75 +++++++++++++++++++ js/test/number/testcurrency.js | 9 +++ js/test/number/testnumfmt2.js | 19 +++++ js/test/root/testscriptinfo.js | 10 +++ 11 files changed, 286 insertions(+), 2 deletions(-) diff --git a/js/test/date/testDayOfWeek.js b/js/test/date/testDayOfWeek.js index 5879a6faa0..7661a51307 100644 --- a/js/test/date/testDayOfWeek.js +++ b/js/test/date/testDayOfWeek.js @@ -1978,5 +1978,15 @@ module.exports.testweekdata = { test.equal(info.getWeekEndStart(), 6); test.equal(info.getWeekEndEnd(), 0); test.done(); + }, + testWeekData_my_MM: function(test) { + test.expect(4); + var info = new LocaleInfo("my-MM"); + test.ok(info !== null); + + test.equal(info.getFirstDayOfWeek(), 0); + test.equal(info.getWeekEndStart(), 6); + test.equal(info.getWeekEndEnd(), 0); + test.done(); } } diff --git a/js/test/date/testMeridiems.js b/js/test/date/testMeridiems.js index 35d6740376..77727173d9 100644 --- a/js/test/date/testMeridiems.js +++ b/js/test/date/testMeridiems.js @@ -1982,6 +1982,16 @@ module.exports.testmeridiems = { test.equal(fmt[0].name, "AM"); test.equal(fmt[1].name, "PM"); + test.done(); + }, + testMeridiem_my_MM: function(test) { + test.expect(3); + var fmt = DateFmt.getMeridiemsRange({locale:"my-MM"}); + test.ok(fmt !== null); + + test.equal(fmt[0].name, 'နံနက်'); + test.equal(fmt[1].name, 'ညနေ'); + test.done(); } } \ No newline at end of file diff --git a/js/test/date/testMonthTranslation.js b/js/test/date/testMonthTranslation.js index a2f0368a44..e16e37984f 100644 --- a/js/test/date/testMonthTranslation.js +++ b/js/test/date/testMonthTranslation.js @@ -7360,6 +7360,51 @@ module.exports.testmonthtranslation = { test.equal(value[10], "aza."); test.equal(value[11], "abe."); + test.done(); + }, + testMonthTranslate_my_MM: function(test) { + test.expect(24); + + // full, long: MMMM + // medium: MMM + // short: MM + + var value = [], i; + var fmt = new DateFmt({locale:"my-MM", date:"m", length: "full", useNative:false, timezone:"local"}) + for (i=0; i < 12; i++) { + value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"})); + } + test.equal(value[0], "ဇန်နဝါရီ"); + test.equal(value[1], "ဖေဖော်ဝါရီ"); + test.equal(value[2], "မတ်"); + test.equal(value[3], "ဧပြီ"); + test.equal(value[4], "မေ"); + test.equal(value[5], "ဇွန်"); + test.equal(value[6], "ဇူလိုင်"); + test.equal(value[7], "ဩဂုတ်"); + test.equal(value[8], "စက်တင်ဘာ"); + test.equal(value[9], "အောက်တိုဘာ"); + test.equal(value[10], "နိုဝင်ဘာ"); + test.equal(value[11], "ဒီဇင်ဘာ"); + + var fmt = new DateFmt({locale:"my-MM", date:"m", length: "medium", useNative:false, timezone:"local"}) + for (i=0; i < 12; i++) { + value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"})); + } + + test.equal(value[0], "ဇန်"); + test.equal(value[1], "ဖေ"); + test.equal(value[2], "မတ်"); + test.equal(value[3], "ဧ"); + test.equal(value[4], "မေ"); + test.equal(value[5], "ဇွန်"); + test.equal(value[6], "ဇူ"); + test.equal(value[7], "ဩ"); + test.equal(value[8], "စက်"); + test.equal(value[9], "အောက်"); + test.equal(value[10], "နို"); + test.equal(value[11], "ဒီ"); + test.done(); } } diff --git a/js/test/date/testWeekdayTranslation.js b/js/test/date/testWeekdayTranslation.js index ac33f51b0d..00294d626b 100644 --- a/js/test/date/testWeekdayTranslation.js +++ b/js/test/date/testWeekdayTranslation.js @@ -11293,6 +11293,77 @@ module.exports.testWeekdayTranslation = { test.equal(value[5], "O"); test.equal(value[6], "L"); + test.done(); + }, + testWeekdayTranslationFull_my_MM: function(test) { + // full -> wide + test.expect(7); + var fmt, value = [], i; + fmt = new DateFmt({locale:"my-MM", date:"w", length: "full", useNative:false, timezone:"local"}) + for (i=0; i < 7; i++) { + value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"})); + } + test.equal(value[0], "တနင်္ဂနွေ"); + test.equal(value[1], "တနင်္လာ"); + test.equal(value[2], "အင်္ဂါ"); + test.equal(value[3], "ဗုဒ္ဓဟူး"); + test.equal(value[4], "ကြာသပတေး"); + test.equal(value[5], "သောကြာ"); + test.equal(value[6], "စနေ"); + test.done(); + }, + testWeekdayTranslationLong_my_MM: function(test) { + // long -> abbreviate + test.expect(7); + var fmt, value = [], i; + fmt = new DateFmt({locale:"my-MM", date:"w", length: "long", useNative:false, timezone:"local"}) + for (i=0; i < 7; i++) { + value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"})); + } + test.equal(value[0], "တနင်္ဂနွေ"); + test.equal(value[1], "တနင်္လာ"); + test.equal(value[2], "အင်္ဂါ"); + test.equal(value[3], "ဗုဒ္ဓဟူး"); + test.equal(value[4], "ကြာသပတေး"); + test.equal(value[5], "သောကြာ"); + test.equal(value[6], "စနေ"); + + test.done(); + }, + testWeekdayTranslationMedium_my_MM: function(test) { + // medium -> short + test.expect(7); + var fmt, value = [], i; + fmt = new DateFmt({locale:"my-MM", date:"w", length: "medium", useNative:false, timezone:"local"}) + for (i=0; i < 7; i++) { + value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"})); + } + test.equal(value[0], "တနင်္ဂနွေ"); + test.equal(value[1], "တနင်္လာ"); + test.equal(value[2], "အင်္ဂါ"); + test.equal(value[3], "ဗုဒ္ဓဟူး"); + test.equal(value[4], "ကြာသပတေး"); + test.equal(value[5], "သောကြာ"); + test.equal(value[6], "စနေ"); + + test.done(); + }, + testWeekdayTranslationShort_my_MM: function(test) { + // short: narrow + test.expect(7); + var fmt, value = [], i; + fmt = new DateFmt({locale:"my-MM", date:"w", length: "short", useNative:false, timezone:"local"}) + for (i=0; i < 7; i++) { + value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"})); + } + test.equal(value[0], "တ"); + test.equal(value[1], "တ"); + test.equal(value[2], "အ"); + test.equal(value[3], "ဗ"); + test.equal(value[4], "က"); + test.equal(value[5], "သ"); + test.equal(value[6], "စ"); + test.done(); } } \ No newline at end of file diff --git a/js/test/date/testcalendar.js b/js/test/date/testcalendar.js index 28e3b88108..299cb90ea7 100644 --- a/js/test/date/testcalendar.js +++ b/js/test/date/testcalendar.js @@ -23,7 +23,7 @@ if (typeof(LocaleInfo) === "undefined") { module.exports.testcalendar = { testDefaultCalendar_GregorianCaseAll: function(test) { - test.expect(194); + test.expect(195); var localeList = ["ar-AE","ar-BH","ar-DJ","ar-DZ","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-MA","ar-MR", "ar-OM","ar-QA","ar-SA","ar-SD","ar-SY","ar-TN","ar-YE","as-IN","az-Latn-AZ","bg-BG","bn-IN","bs-Latn-BA,bs-Latn-ME", "cs-CZ","da-DK","de-AT","de-CH","de-DE","de-LU","et-EE","el-CY","el-GR","en-AM","en-AU","en-AZ","en-CA","en-GB","en-GH", @@ -33,7 +33,7 @@ module.exports.testcalendar = { "es-PY","es-SV","es-US","es-UY","es-VE","eu-ES","fi-FI","fr-BE","fr-BF","fr-BJ","fr-CA","fr-CD","fr-CF","fr-CG","fr-CH","fr-CI", "fr-CM","fr-GQ","fr-DJ","fr-DZ","fr-FR","fr-GA","fr-GN","fr-LB","fr-LU","fr-ML","fr-RW","fr-SN","fr-TG","ga-IE","gu-IN", "he-IL","hi-IN","hi-SG","hr-HR","hr-ME","hu-HU","id-ID","is-IS","it-CH","it-IT","ja-JP","ka-GE","kk-Cyrl-KZ","km-KH","kn-IN", - "ko-KR","ku-Arab-IQ","lt-LT","lv-LV","mk-MK","ml-IN","mn-Cyrl-MN","mr-IN","ms-MY","ms-SG","nb-NO","nl-BE","nl-NL","pa-IN", + "ko-KR","ku-Arab-IQ","lt-LT","lv-LV","mk-MK","ml-IN","mn-Cyrl-MN","mr-IN","ms-MY","ms-SG","my-MM","nb-NO","nl-BE","nl-NL","pa-IN", "pa-PK","pl-PL","pt-AO","pt-BR","pt-GQ","pt-CV","pt-PT","ro-RO","ru-BY","ru-GE","ru-KG","ru-KZ","ru-RU","ru-UA","si-LK", "sk-SK","sl-SI","sq-AL","sq-ME","sr-Latn-ME","sr-Latn-RS","sv-FI","sv-SE","sw-KE","ta-IN","ta-SG","te-IN","tr-AM","tr-AZ", "tr-CY","tr-TR","uk-UA","ur-IN","ur-PK","uz-Cyrl-UZ","uz-Latn-UZ","vi-VN","zh-Hans-CN","zh-Hans-SG","zh-Hant-HK", diff --git a/js/test/date/testclock.js b/js/test/date/testclock.js index 4f613c0ad9..a15cdfaa4b 100644 --- a/js/test/date/testclock.js +++ b/js/test/date/testclock.js @@ -1782,6 +1782,15 @@ module.exports.testclock = { test.equal(info.getClock(), 24); + test.done(); + }, + testClock_my_MM: function(test) { + test.expect(2); + var info = new LocaleInfo("my-MM"); + test.ok(info !== null); + + test.equal(info.getClock(), 24); + test.done(); } } diff --git a/js/test/date/testdatetimefmt.js b/js/test/date/testdatetimefmt.js index 2a82fc664a..8e09dbf295 100644 --- a/js/test/date/testdatetimefmt.js +++ b/js/test/date/testdatetimefmt.js @@ -5154,6 +5154,32 @@ module.exports.testdatetimeformat = { result1 = new DateFmt({locale:"eu-ES", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template; test.equal(result1, "HH:mm:ss (z)"); + test.done(); + }, + testDateTimeFormat_my_MM: function(test) { + test.expect(7); + + var result1, result2, result3, result4; + + result1 = new DateFmt({locale:"my-MM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template; + result2 = new DateFmt({locale:"my-MM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template; + result3 = new DateFmt({locale:"my-MM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template; + result4 = new DateFmt({locale:"my-MM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template; + + test.equal(result1, "yyyy၊ MMMM d၊ EEEE"); + test.equal(result2, "yyyy၊ d MMMM၊ EEE"); + test.equal(result3, "yyyy၊ MMM d၊ EE"); + test.equal(result4, "dd-MM-yy၊ E"); + + result1 = new DateFmt({locale:"my-MM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template; + result2 = new DateFmt({locale:"my-MM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template; + + test.equal(result1, "yyyy၊ MMMM d၊ EEEE B H:mm"); + test.equal(result2, "dd-MM-yy၊ E B H:mm"); + + result1 = new DateFmt({locale:"my-MM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template; + test.equal(result1, "z B HH:mm:ss"); + test.done(); } } \ No newline at end of file diff --git a/js/test/daterange/testdatefmtrange_fmttemplate.js b/js/test/daterange/testdatefmtrange_fmttemplate.js index 150881ed35..0b36859b72 100644 --- a/js/test/daterange/testdatefmtrange_fmttemplate.js +++ b/js/test/daterange/testdatefmtrange_fmttemplate.js @@ -13936,6 +13936,81 @@ module.exports.testdaterangefmt = { test.equal(templatec30[2], "{sy} – {ey}"); test.equal(templatec30[3], "{sy} – {ey}"); + test.done(); + }, + testDateRngFmt_my_MM: function(test) { + test.expect(36); + var fmt; + var data = setVariables(); + var length = data["fullLength"]; + var abbrLength = data["abbrLength"]; + + var templatec00 = [],templatec01 = [],templatec02 = [],templatec03 = []; + var templatec10 = [],templatec11 = [],templatec12 = [],templatec20 = []; + var templatec30 = []; + + // full, medium: ymd + // long: ydm + // short: dmy + + for (var i=0; i < 4; i++) { + fmt = new DateRngFmt({locale:"my-MM", length: length[i]}) + templatec00.push(fmt.dateFmt.formats.range["c00"][abbrLength[i]]); + templatec01.push(fmt.dateFmt.formats.range["c01"][abbrLength[i]]); + templatec02.push(fmt.dateFmt.formats.range["c02"][abbrLength[i]]); + templatec03.push(fmt.dateFmt.formats.range["c03"][abbrLength[i]]); + templatec10.push(fmt.dateFmt.formats.range["c10"][abbrLength[i]]); + templatec11.push(fmt.dateFmt.formats.range["c11"][abbrLength[i]]); + templatec12.push(fmt.dateFmt.formats.range["c12"][abbrLength[i]]); + templatec20.push(fmt.dateFmt.formats.range["c20"][abbrLength[i]]); + templatec30.push(fmt.dateFmt.formats.range["c30"][abbrLength[i]]); + } + + test.equal(templatec00[0], '{sy}၊ {sm} {sd} {st} – {et}'); + test.equal(templatec00[1], '{sy}၊ {sd} {sm} {st} – {et}'); + test.equal(templatec00[2], '{sy}၊ {sm} {sd} {st} – {et}'); + test.equal(templatec00[3], '{sd}-{sm}-{sy} {st} – {et}'); + + test.equal(templatec01[0], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); + test.equal(templatec01[1], '{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}'); + test.equal(templatec01[2], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); + test.equal(templatec01[3], '{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}'); + + test.equal(templatec02[1], '{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}'); + test.equal(templatec02[0], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); + test.equal(templatec02[2], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); + test.equal(templatec02[3], '{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}'); + + test.equal(templatec03[0], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); + test.equal(templatec03[1], '{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}'); + test.equal(templatec03[2], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); + test.equal(templatec03[3], '{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}'); + + test.equal(templatec10[0], '{sy}၊ {sm} {sd} – {ed}'); + test.equal(templatec10[1], '{sy}၊ {sd} {sm} – {ed} {em}'); + test.equal(templatec10[2], '{sy}၊ {sm} {sd} – {ed}'); + test.equal(templatec10[3], '{sd} – {ed}-{em}-{ey}'); + + test.equal(templatec11[0], '{sy}၊ {sm} {sd} – {em} {ed}'); + test.equal(templatec11[1], '{sy}၊ {sd} {sm} – {ey}၊ {ed} {em}'); + test.equal(templatec11[2], '{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}'); + test.equal(templatec11[3], '{sd}-{sm} – {ed}-{em}-{ey}'); + + test.equal(templatec12[0], '{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}'); + test.equal(templatec12[1], '{sy}၊ {sd} {sm} – {ey}၊ {ed} {em}'); + test.equal(templatec12[2], '{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}'); + test.equal(templatec12[3], '{sd}-{sm}-{sy} – {ed}-{em}-{ey}'); + + test.equal(templatec20[0], '{sy}၊ {sm} – {ey}၊ {em}'); + test.equal(templatec20[1], '{sy}၊ {sm} – {ey}၊ {em}'); + test.equal(templatec20[2], '{sy}၊ {sm} – {ey}၊ {em}'); + test.equal(templatec20[3], '{sm}-{sy} – {em}-{ey}'); + + test.equal(templatec30[0], "{sy} – {ey}"); + test.equal(templatec30[1], "{sy} – {ey}"); + test.equal(templatec30[2], "{sy} – {ey}"); + test.equal(templatec30[3], "{sy} – {ey}"); + test.done(); } } \ No newline at end of file diff --git a/js/test/number/testcurrency.js b/js/test/number/testcurrency.js index 4ebc9bedf3..74ea54ef02 100644 --- a/js/test/number/testcurrency.js +++ b/js/test/number/testcurrency.js @@ -1902,6 +1902,15 @@ module.exports.testcurrency = { test.equal(info.getCurrency(), "GEL"); + test.done(); + }, + testCurrency_my_MM: function(test) { + test.expect(2); + var info = new LocaleInfo("my-MM"); + test.ok(info !== null); + + test.equal(info.getCurrency(), "MMK"); + test.done(); } }; diff --git a/js/test/number/testnumfmt2.js b/js/test/number/testnumfmt2.js index 03d365cd7e..addcef731b 100644 --- a/js/test/number/testnumfmt2.js +++ b/js/test/number/testnumfmt2.js @@ -3792,5 +3792,24 @@ module.exports.testnumfmt2 = { test.equal(li.getCurrencyFormats().commonNegative, "−{n} {s}"); test.equal(curfmt.format(57.05), "57,05 €"); test.done(); + }, + testNumFmt_my_MM: function(test) { + test.expect(9); + var li = new LocaleInfo("my-MM"); + var fmt = new NumFmt({locale:"my-MM", type:"standard", useNative:false}); + test.equal(li.getDecimalSeparator(), "."); + test.equal(li.getGroupingSeparator(), ","); + test.equal(fmt.format(123456789.45), "123,456,789.45"); + + var pctfmt = new NumFmt({locale:"my-MM", type:"percentage", useNative:false}); + test.equal(li.getPercentageFormat(), "{n}%"); + test.equal(li.getNegativePercentageFormat(), "-{n}%"); + test.equal(pctfmt.format(34), "34%"); + + var curfmt = new NumFmt({locale: "my-MM", type: "currency", useNative:false, currency:li.getCurrency()}); + test.equal(li.getCurrencyFormats().common, "{n} {s}"); + test.equal(li.getCurrencyFormats().commonNegative, "-{n} {s}"); + test.equal(curfmt.format(57.05), "57 K"); + test.done(); } } \ No newline at end of file diff --git a/js/test/root/testscriptinfo.js b/js/test/root/testscriptinfo.js index 88d3e3b400..e352a3b604 100644 --- a/js/test/root/testscriptinfo.js +++ b/js/test/root/testscriptinfo.js @@ -2195,5 +2195,15 @@ module.exports.testscriptinfo = { test.equal(li.getScript(), "Latn"); test.equal(scinfo.getScriptDirection(), "ltr"); test.done(); + }, + testScriptInfo_my_MM: function(test) { + test.expect(4); + var li = new LocaleInfo("my-MM"); + var scinfo = new ScriptInfo(li.getScript()); + test.ok(li !== null); + test.ok(scinfo !== null); + test.equal(li.getScript(), "Mymr"); + test.equal(scinfo.getScriptDirection(), "ltr"); + test.done(); } }; From 5744992c6d873a8c76e06de2fd0177070636455e Mon Sep 17 00:00:00 2001 From: Goun Lee Date: Thu, 27 Aug 2020 12:20:40 +0900 Subject: [PATCH 2/8] Add more testcase to verify my-MM --- js/build.xml | 4 +- js/test/date/testSuite.html | 7 +- js/test/date/testSuiteFiles.js | 1 + js/test/date/testdatefmt_my_MM.js | 1802 +++++++++++++++++++ js/test/daterange/testSuite.html | 3 +- js/test/daterange/testSuiteFiles.js | 3 +- js/test/daterange/testdatefmtrange_my_MM.js | 692 +++++++ js/test/durfmt/testdurfmt2.js | 41 + js/test/root/testcountry.js | 26 + js/test/root/testlocaleinfo.js | 10 + js/test/root/testlocalematch.js | 55 + js/test/root/teststrings.js | 40 + js/test/strings-ext/testSuite.html | 1 + js/test/strings-ext/testSuiteCompiled.html | 3 +- js/test/strings-ext/testSuiteFiles.js | 3 +- js/test/strings-ext/testlistfmt_my_MM.js | 253 +++ js/test/testSuite.html | 2 +- js/test/units/testSuite.html | 1 + js/test/units/testSuiteFiles.js | 1 + js/test/units/testunitfmt_my_MM.js | 348 ++++ 20 files changed, 3286 insertions(+), 10 deletions(-) create mode 100644 js/test/date/testdatefmt_my_MM.js create mode 100644 js/test/daterange/testdatefmtrange_my_MM.js create mode 100644 js/test/strings-ext/testlistfmt_my_MM.js create mode 100644 js/test/units/testunitfmt_my_MM.js diff --git a/js/build.xml b/js/build.xml index 616ffcdb9b..edfd35ebf3 100644 --- a/js/build.xml +++ b/js/build.xml @@ -53,8 +53,8 @@ limitations under the License. - - + + diff --git a/js/test/date/testSuite.html b/js/test/date/testSuite.html index 00c43149e6..7fa9c3d4c8 100644 --- a/js/test/date/testSuite.html +++ b/js/test/date/testSuite.html @@ -1,7 +1,7 @@ + diff --git a/js/test/date/testSuiteFiles.js b/js/test/date/testSuiteFiles.js index 4e79853723..6fc6f4e9b9 100644 --- a/js/test/date/testSuiteFiles.js +++ b/js/test/date/testSuiteFiles.js @@ -79,6 +79,7 @@ module.exports.files = [ "testdatefmt_mn_Cyrl_MN.js", "testdatefmt_mr_IN.js", "testdatefmt_ms_MY.js", + "testdatefmt_my_MM.js", "testdatefmt_nb_NO.js", "testdatefmt_nl_NL.js", "testdatefmt_or_IN.js", diff --git a/js/test/date/testdatefmt_my_MM.js b/js/test/date/testdatefmt_my_MM.js new file mode 100644 index 0000000000..e0ef01302b --- /dev/null +++ b/js/test/date/testdatefmt_my_MM.js @@ -0,0 +1,1802 @@ +/* + * testdatefmt_my_MM.js - test the date formatter object in Basque/Spain + * + * Copyright © 2020, JEDLSoft + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if (typeof(JulianDate) === "undefined") { + var JulianDate = require("../../lib/JulianDate.js"); +} +if (typeof(GregorianDate) === "undefined") { + var GregorianDate = require("../../lib/GregorianDate.js"); +} +if (typeof(DateFmt) === "undefined") { + var DateFmt = require("../../lib/DateFmt.js"); +} +if (typeof(ilib) === "undefined") { + var ilib = require("../../lib/ilib.js"); +} + +module.exports.testdatefmt_my_MM = { + setUp: function(callback) { + ilib.clearCache(); + callback(); + }, + + testDateFmtConstructorEmpty_my_MM: function(test) { + test.expect(1); + var fmt = new DateFmt({locale: "my-MM"}); + + test.ok(fmt !== null); + test.done(); + }, + + testDateFmtSimpleShort_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "short", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29-09-11'); + test.done(); + }, + + testDateFmtSimpleMedium_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "medium", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '2011၊ စက် 29'); + test.done(); + }, + + testDateFmtSimpleLong_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "long", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date),'2011၊ 29 စက်တင်ဘာ'); + test.done(); + }, + + testDateFmtSimpleFull_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '2011၊ စက်တင်ဘာ 29'); + test.done(); + }, + + testDateFmtSimpleTimeShort_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "short", type: "time", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'B 13:45'); + test.done(); + }, + + testDateFmtSimpleTimeMedium_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "medium", type: "time", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'B 13:45'); + test.done(); + }, + + testDateFmtSimpleTimeLong_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", timelength: "long", type: "time", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'B 13:45'); + test.done(); + }, + + testDateFmtSimpleTimeFull_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full", type: "time", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 1, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'B 1:45'); + test.done(); + }, + + testDateFmtDateTimeSimpleShort_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "short", type: "datetime", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29-09-11 B 13:45'); + test.done(); + }, + + testDateFmtDateTimeSimpleMedium_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "medium", type: "datetime", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '2011၊ စက် 29 B 13:45'); + test.done(); + }, + + testDateFmtDateTimeSimpleLong_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "long", type: "datetime", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '2011၊ 29 စက်တင်ဘာ B 13:45'); + test.done(); + }, + + testDateFmtDateTimeSimpleFull_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full", type: "datetime", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '2011၊ စက်တင်ဘာ 29 B 13:45'); + test.done(); + }, + + testDateFmtTemplateCalendar_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", calendar: "julian", template: "yyyy-MM-dd", useNative: false}); + test.ok(fmt !== null); + + var date = new JulianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "2011-09-29"); + test.done(); + }, + + testDateFmtTemplateCalendarIncompatibleDateType_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", calendar: "julian", template: "yyyy-MM-dd HH:mm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + // convert automatically to a Julian calendar date + test.equal(fmt.format(date), "2011-09-16 13:45"); + test.done(); + }, + + testDateFmtTemplateClock12SwitchHH_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", clock: "12", template: "HH:mm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "01:45"); + test.done(); + }, + + testDateFmtTemplateClock12Switchkk_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", clock: "12", template: "kk:mm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "01:45"); + test.done(); + }, + + testDateFmtTemplateClock24Switchhh_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", clock: "24", template: "hh:mm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45"); + test.done(); + }, + + testDateFmtTemplateClock24SwitchKK: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", clock: "24", template: "KK:mm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45"); + test.done(); + }, + + testDateFmtTemplateNoClockDoNotFollowLocaleDefault12hh_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", template: "hh:mm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "01:45"); + test.done(); + }, + + testDateFmtTemplateNoClockDoNotFollowLocaleDefault12KK: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", template: "KK:mm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "01:45"); + test.done(); + }, + + testDateFmtTemplateNoClockDoNotFollowLocaleDefault24HH_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", template: "HH:mm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45"); + test.done(); + }, + + testDateFmtTemplateNoClockDoNotFollowLocaleDefault24kk_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", template: "kk:mm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45"); + test.done(); + }, + + + testDateFmtTypeDate_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "date", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29-09-11'); + test.done(); + }, + + testDateFmtTypeTime_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'B 13:45'); + test.done(); + }, + + testDateFmtTypeDateTime_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "datetime", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29-09-11 B 13:45'); + test.done(); + }, + + testDateFmtShortDateComponentsY_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", date: "y", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "11"); + test.done(); + }, + + testDateFmtShortDateComponentsM_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", date: "m", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '09'); + test.done(); + }, + + testDateFmtShortDateComponentsN_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", date: "n", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'စ'); + test.done(); + }, + + testDateFmtShortDateComponentsD_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", date: "d", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "29"); + test.done(); + }, + + testDateFmtShortDateComponentsDM_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", date: "dm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29-09'); + test.done(); + }, + + testDateFmtShortDateComponentsMY_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", date: "my", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '09-11'); + test.done(); + }, + + testDateFmtShortDateComponentsDMY_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", date: "dmy", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29-09-11'); + test.done(); + }, + + testDateFmtShortDateComponentsWDM_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", date: "wdm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29-09၊ က'); + test.done(); + }, + + testDateFmtShortDateComponentsWDMY_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", date: "wdmy", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29-09-11၊ က'); + test.done(); + }, + + testDateFmtLongDateComponentsWDM_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", date: "wdm", length: "long", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29 စက်တင်ဘာ၊ ကြာသပတေး'); + test.done(); + }, + + testDateFmtFullDateComponentsY_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full", date: "y", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "2011"); + test.done(); + }, + + testDateFmtFullDateComponentsM_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full", date: "m", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'စက်တင်ဘာ'); + test.done(); + }, + + testDateFmtFullDateComponentsD_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full", date: "d", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "29"); + test.done(); + }, + + testDateFmtFullDateComponentsDM_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full", date: "dm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'စက်တင်ဘာ 29'); + test.done(); + }, + + testDateFmtFullDateComponentsMY_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full", date: "my", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '2011၊ စက်တင်ဘာ'); + test.done(); + }, + + testDateFmtFullDateComponentsDMY_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full", date: "dmy", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '2011၊ စက်တင်ဘာ 29'); + test.done(); + }, + + testDateFmtFullDateComponentsWDM_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full", date: "wdm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'စက်တင်ဘာ 29၊ ကြာသပတေး'); + test.done(); + }, + + testDateFmtFullDateComponentsWDMY_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full", date: "wdmy", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '2011၊ စက်တင်ဘာ 29၊ ကြာသပတေး'); + test.done(); + }, + + testDateFmtShortTimeComponentsS_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", time: "s", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "37"); + test.done(); + }, + + testDateFmtShortTimeComponentsM_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", time: "m", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "45"); + test.done(); + }, + + testDateFmtShortTimeComponentsH_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", time: "h", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13"); + test.done(); + }, + + testDateFmtShortTimeComponentsMS_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", time: "ms", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "45:37"); + test.done(); + }, + + testDateFmtShortTimeComponentsHM_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", time: "hm",useNative:false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "B 13:45"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMS_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", time: "hms", useNative:false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "B 13:45:37"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMA_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", time: "hma", useNative:false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "B 13:45"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMZ_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "my-MM", + type: "time", + time: "hmz", + timezone: "Asia/Rangoon", + useNative: false + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "UTC B 13:45"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMAZ_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "my-MM", + type: "time", + time: "hmaz", + timezone: "Asia/Rangoon", + useNative: false + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "UTC B 13:45"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMSA_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", time: "hmsa", useNative:false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "B 13:45:37"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMSZ_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "my-MM", + type: "time", + time: "hmsz", + timezone: "Asia/Rangoon", + useNative: false + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "UTC B 13:45:37"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMSAZ_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "my-MM", + type: "time", + time: "hmsaz", + timezone: "Asia/Rangoon", + useNative: false + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "UTC B 13:45:37"); + test.done(); + }, + + testDateFmtFullTimeComponentsS_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", length: "full", time: "s", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "37"); + test.done(); + }, + + testDateFmtFullTimeComponentsM_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", length: "full", time: "m", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "45"); + test.done(); + }, + + testDateFmtFullTimeComponentsH_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", length: "full", time: "h", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13"); + test.done(); + }, + + testDateFmtFullTimeComponentsMS_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", length: "full", time: "ms",useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "45:37"); + test.done(); + }, + + testDateFmtFullTimeComponentsHM_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", length: "full", time: "hm", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "B 13:45"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMS_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", length: "full", time: "hms", useNative:false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "B 13:45:37"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMA_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "my-MM", + type: "time", + length: "full", + time: "hma", + useNative: false + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "B 13:45"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMZ_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "my-MM", + type: "time", + length: "full", + time: "hmz", + timezone: "Asia/Rangoon", + useNative: false + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "UTC B 13:45"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMAZ_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "my-MM", + type: "time", + length: "full", + time: "hmaz", + timezone: "Asia/Rangoon", + useNative: false + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "UTC B 13:45"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMSA_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", type: "time", length: "full", time: "hmsa", useNative: false}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "B 13:45:37"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMSZ_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "my-MM", + type: "time", + length: "full", + time: "hmsz", + timezone: "Asia/Rangoon", + useNative: false + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "UTC B 13:45:37"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMSAZ_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "my-MM", + type: "time", + length: "full", + time: "hmsaz", + timezone: "Asia/Rangoon", + useNative: false + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "UTC B 13:45:37"); + test.done(); + }, + + testDateFmtWithTimeZoneAndNoDST_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "my-MM", + type: "time", + length: "full", + time: "hmsz", + timezone: "Asia/Rangoon", + useNative: false + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 12, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "UTC B 13:45:37"); + test.done(); + }, + + testDateFmtFormatRelativeWithinMinuteAfter_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 30, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '30 စက္ကန့်အတွင်း'); + test.done(); + }, +testDateFmtFormatRelativeWithinMinuteBefore_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 44, + second: 30, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), 'ပြီးခဲ့သည့် 30 စက္ကန့်'); + test.done(); + }, +testDateFmtFormatRelativeWithinHourAfter_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '10 မိနစ်အတွင်း'); + test.done(); + }, +testDateFmtFormatRelativeWithinHourBefore_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 35, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), 'ပြီးခဲ့သည့် 10 မိနစ်'); + test.done(); + }, +testDateFmtFormatRelativeWithinDayAfter_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 17, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '4 နာရီအတွင်း'); + test.done(); + }, +testDateFmtFormatRelativeWithinDayBefore_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 9, + minute: 35, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), 'ပြီးခဲ့သည့် 4 နာရီ'); + test.done(); + }, + + testDateFmtFormatRelativeWithinFortnightAfter_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 24, + hour: 15, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '4 ရက်အတွင်း'); + test.done(); + }, +testDateFmtFormatRelativeWithinFortnightBefore_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 16, + hour: 9, + minute: 35, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), 'ပြီးခဲ့သည့် 4 ရက်'); + test.done(); + }, + + testDateFmtFormatRelativeWithinQuarterAfter_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 11, + day: 24, + hour: 15, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '9 ပတ်အတွင်း'); + test.done(); + }, +testDateFmtFormatRelativeWithinQuarterBefore_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 7, + day: 18, + hour: 9, + minute: 35, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), 'ပြီးခဲ့သည့် 9 ပတ်'); + test.done(); + }, + + testDateFmtFormatRelativeWithinTwoYearsAfter_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2013, + month: 1, + day: 24, + hour: 15, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '16 လအတွင်း'); + test.done(); + }, +testDateFmtFormatRelativeWithinTwoYearsBefore_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2010, + month: 7, + day: 18, + hour: 9, + minute: 35, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), 'ပြီးခဲ့သည့် 14 လ'); + test.done(); + }, + + testDateFmtFormatRelativeYearsAfter_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 2025, + month: 10, + day: 24, + hour: 15, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '14 နှစ်အတွင်း'); + test.done(); + }, +testDateFmtFormatRelativeYearsBefore_my_MM: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "my-MM", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "my-MM", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "my-MM", + year: 1990, + month: 7, + day: 18, + hour: 9, + minute: 35, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), 'ပြီးခဲ့သည့် 21 နှစ်'); + test.done(); + } +}; \ No newline at end of file diff --git a/js/test/daterange/testSuite.html b/js/test/daterange/testSuite.html index 21f78f5323..e24e31d670 100644 --- a/js/test/daterange/testSuite.html +++ b/js/test/daterange/testSuite.html @@ -1,7 +1,7 @@ + @@ -126,4 +126,4 @@

date Test Suite

nodeunit.run(module.exports); - \ No newline at end of file + diff --git a/js/test/date/testdatefmt_my_MM.js b/js/test/date/testdatefmt_my_MM.js index e0ef01302b..d786de831d 100644 --- a/js/test/date/testdatefmt_my_MM.js +++ b/js/test/date/testdatefmt_my_MM.js @@ -1,5 +1,5 @@ /* - * testdatefmt_my_MM.js - test the date formatter object in Basque/Spain + * testdatefmt_my_MM.js - test the date formatter object in Burmese-Myanmar * * Copyright © 2020, JEDLSoft * From c15a45644e31b4c6af287220a36b848775784dbe Mon Sep 17 00:00:00 2001 From: Goun Lee Date: Thu, 27 Aug 2020 12:47:19 +0900 Subject: [PATCH 4/8] Add testcase to test native digits --- js/test/number/testnumfmt.js | 93 +++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/js/test/number/testnumfmt.js b/js/test/number/testnumfmt.js index 6c46bcf969..05d127bbff 100644 --- a/js/test/number/testnumfmt.js +++ b/js/test/number/testnumfmt.js @@ -1,7 +1,7 @@ /* * testnumfmt.js - test the number formatter object * - * Copyright © 2012-2018 JEDLSoft + * Copyright © 2012-2018 2020 JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -6870,5 +6870,96 @@ module.exports.testnumfmt = { test.equal(fmt.format(12345678900), "1.23E+10"); test.done(); + }, + + //test cases for my-MM + + testNumFmt_my_MM: function(test) { + test.expect(2); + var fmt = new NumFmt({ + locale: "my-MM", + maxFractionDigits: 2 + }); + test.ok(fmt); + test.equal(fmt.format(12340568.78), "၁၂,၃၄၀,၅၆၈.၇၈"); + test.done(); + }, + testNumFmtNative_my_MM: function(test) { + test.expect(2); + var fmt = new NumFmt({ + locale: "my-MM", + useNative: true, + maxFractionDigits: 2 + }); + test.ok(fmt); + test.equal(fmt.format(-123.57), "-၁၂၃.၅၇"); + test.done(); + }, + testNumFmtCurrencyFormatNativeCurrencyForLocale_my_MM1: function(test) { + test.expect(2); + var fmt = new NumFmt({ + type: "currency", + locale: "my-MM", + useNative: true, + currency: "MMK" + }); + test.ok(fmt); + test.equal(fmt.format(123.57), "၁၂၄ K"); + test.done(); + }, + testNumFmtCurrencyFormatNegativeNativeCurrencyForLocale_my_MM1: function(test) { + test.expect(2); + var fmt = new NumFmt({ + type: "currency", + locale: "my-MM", + useNative: true, + currency: "MMK" + }); + test.ok(fmt); + test.equal(fmt.format(-123.57), "-၁၂၄ K"); + test.done(); + }, + testNumFmtCurrencyFormatCorrectCurrencyForLocale_my_MM: function(test) { + test.expect(2); + var fmt = new NumFmt({ + type: "currency", + locale: "my-MM", + currency: "MMK" + }); + test.ok(fmt); + test.equal(fmt.format(123.57), "၁၂၄ K"); + test.done(); + }, + testNumFmtPercentageFormatRegular_my_MM: function(test) { + test.expect(2); + var fmt = new NumFmt({ + locale: "my-MM", + useNative: true, + type: "percentage" + }); + test.ok(fmt); + test.equal(fmt.format(57.8), "੫੭.੮%"); + test.done(); + }, + testNumFmtPercentageFormatRegular_my_MM: function(test) { + test.expect(2); + var fmt = new NumFmt({ + locale: "my-MM", + useNative: true, + type: "percentage" + }); + test.ok(fmt); + test.equal(fmt.format(-57.8), '-၅၇.၈%'); + test.done(); + }, + testNumFmtPercentageNativeFormatRegular_my_MM: function(test) { + test.expect(2); + var fmt = new NumFmt({ + locale: "my-MM", + type: "percentage" + }); + test.ok(fmt); + test.equal(fmt.format(-57.8), '-၅၇.၈%'); + test.done(); } }; From 43d364e9afe15e90de307676f4701169c346845c Mon Sep 17 00:00:00 2001 From: Goun Lee Date: Thu, 27 Aug 2020 18:04:25 +0900 Subject: [PATCH 5/8] Update test function name in testlistfmt_my_MM.js --- js/test/strings-ext/testlistfmt_my_MM.js | 40 ++++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/js/test/strings-ext/testlistfmt_my_MM.js b/js/test/strings-ext/testlistfmt_my_MM.js index ab2f486a4d..e32de326c1 100644 --- a/js/test/strings-ext/testlistfmt_my_MM.js +++ b/js/test/strings-ext/testlistfmt_my_MM.js @@ -30,7 +30,7 @@ module.exports.testlistfmt_my_MM = { ilib.clearCache(); callback(); }, - testListFmteuESNumberFormatOne: function(test) { + testListFmtNumberFormatOne_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM" }); @@ -40,7 +40,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္"]), "တစ္"); test.done(); }, - testListFmteuESNumberFormatTwo: function(test) { + testListFmtNumberFormatTwo_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM" }); @@ -50,7 +50,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္"]), 'တစ္နှင့် ႎႀစ္'); test.done(); }, - testListFmteuESNumberFormatThree: function(test) { + testListFmtNumberFormatThree_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM" }); @@ -60,7 +60,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္", "သံုး"]), 'တစ္ ႎႀစ္နှင့် သံုး'); test.done(); }, - testListFmteuESNumberFormatFour: function(test) { + testListFmtNumberFormatFour_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM" }); @@ -70,7 +70,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္", "သံုး", "ေလး"]), 'တစ္ ႎႀစ္ သံုးနှင့် ေလး'); test.done(); }, - testListFmteuESNumberFormatFive: function(test) { + testListFmtNumberFormatFive_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM" }); @@ -80,7 +80,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္", "သံုး", "ေလး", "ငၝး"]), 'တစ္ ႎႀစ္ သံုး ေလးနှင့် ငၝး'); test.done(); }, - testListFmtUnitStyleeuESNumberFormatOneShort: function(test) { + testListFmtUnitStyleNumberFormatOneShort_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "unit" @@ -91,7 +91,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္"]), "တစ္"); test.done(); }, - testListFmtUnitStyleeuESNumberFormatTwoShort: function(test) { + testListFmtUnitStyleNumberFormatTwoShort_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "unit" @@ -102,7 +102,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္"]), 'တစ္နှင့် ႎႀစ္'); test.done(); }, - testListFmtUnitStyleeuESNumberFormatThreeShort: function(test) { + testListFmtUnitStyleNumberFormatThreeShort_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "unit" @@ -113,7 +113,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္", "သံုး"]), 'တစ္ ႎႀစ္နှင့် သံုး'); test.done(); }, - testListFmtUnitStyleeuESNumberFormatFourShort: function(test) { + testListFmtUnitStyleNumberFormatFourShort_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "unit" @@ -124,7 +124,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္", "သံုး", "ေလး"]), 'တစ္ ႎႀစ္ သံုးနှင့် ေလး'); test.done(); }, - testListFmtUnitStyleeuESNumberFormatFiveShort: function(test) { + testListFmtUnitStyleNumberFormatFiveShort_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "unit" @@ -135,7 +135,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္", "သံုး", "ေလး", "ငၝး"]), 'တစ္ ႎႀစ္ သံုး ေလးနှင့် ငၝး'); test.done(); }, - testListFmtUnitStyleeuESNumberFormatOneFull: function(test) { + testListFmtUnitStyleNumberFormatOneFull_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "unit", @@ -147,7 +147,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္"]), "တစ္"); test.done(); }, - testListFmtUnitStyleeuESNumberFormatTwoFull: function(test) { + testListFmtUnitStyleNumberFormatTwoFull_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "unit", @@ -159,7 +159,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္"]), 'တစ္နှင့်ႎႀစ္'); test.done(); }, - testListFmtUnitStyleeuESNumberFormatThreeFull: function(test) { + testListFmtUnitStyleNumberFormatThreeFull_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "unit", @@ -171,7 +171,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္", "သံုး"]), 'တစ္ ႎႀစ္နှင့် သံုး'); test.done(); }, - testListFmtUnitStyleeuESNumberFormatFourFull: function(test) { + testListFmtUnitStyleNumberFormatFourFull_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "unit", @@ -183,7 +183,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္", "သံုး", "ေလး"]), 'တစ္ ႎႀစ္ သံုးနှင့် ေလး'); test.done(); }, - testListFmtUnitStyleeuESNumberFormatFiveFull: function(test) { + testListFmtUnitStyleNumberFormatFiveFull_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "unit", @@ -195,7 +195,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္", "သံုး", "ေလး", "ငၝး"]), 'တစ္ ႎႀစ္ သံုး ေလးနှင့် ငၝး'); test.done(); }, - testListFmtORStyleeuESNumberFormatOne: function(test) { + testListFmtORStyleNumberFormatOne_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "disjunction" @@ -206,7 +206,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္"]), "တစ္"); test.done(); }, - testListFmtORStyleeuESNumberFormatTwo: function(test) { + testListFmtORStyleNumberFormatTwo_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "disjunction" @@ -217,7 +217,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္"]), 'တစ္ သို့မဟုတ် ႎႀစ္'); test.done(); }, - testListFmtORStyleeuESNumberFormatThree: function(test) { + testListFmtORStyleNumberFormatThree_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "disjunction" @@ -228,7 +228,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္", "သံုး"]), 'တစ္ ၊ ႎႀစ္ သို့မဟုတ် သံုး'); test.done(); }, - testListFmtORStyleeuESNumberFormatFour: function(test) { + testListFmtORStyleNumberFormatFour_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "disjunction" @@ -239,7 +239,7 @@ module.exports.testlistfmt_my_MM = { test.equal(fmt.format(["တစ္", "ႎႀစ္", "သံုး", "ေလး"]), 'တစ္ ၊ ႎႀစ္ သံုး သို့မဟုတ် ေလး'); test.done(); }, - testListFmtORStyleeuESNumberFormatFiveFull: function(test) { + testListFmtORStyleNumberFormatFiveFull_my_MM: function(test) { var fmt = new ListFmt({ locale: "my-MM", style: "disjunction" From 76ce447bf29c636437f734a2ccd6b5afc4abd0c7 Mon Sep 17 00:00:00 2001 From: Goun Lee Date: Tue, 1 Sep 2020 18:01:26 +0900 Subject: [PATCH 6/8] Manually update dateformats.json file and fix some test caess --- js/data/locale/my/dateformats.json | 64 +++++++++---------- js/test/date/testdatefmt_my_MM.js | 62 +++++++++--------- js/test/date/testdatetimefmt.js | 6 +- .../daterange/testdatefmtrange_fmttemplate.js | 24 +++---- js/test/daterange/testdatefmtrange_my_MM.js | 26 ++++---- 5 files changed, 91 insertions(+), 91 deletions(-) diff --git a/js/data/locale/my/dateformats.json b/js/data/locale/my/dateformats.json index d58c81f758..8b65b8747c 100644 --- a/js/data/locale/my/dateformats.json +++ b/js/data/locale/my/dateformats.json @@ -12,7 +12,7 @@ "f": "yyyy၊ MMMM d", "l": "yyyy၊ d MMMM", "m": "yyyy၊ MMM d", - "s": "dd-MM-yy" + "s": "dd-MM-yy၊" }, "dmw": { "f": "MMMM d၊ EEEE", @@ -30,7 +30,7 @@ "f": "yyyy၊ MMMM", "l": "yyyy၊ MMMM", "m": "yyyy၊ MMM", - "s": "MM-yy" + "s": "MM-yy၊" }, "dw": { "f": "d၊ EEEE", @@ -68,31 +68,31 @@ "h": "h", "m": "mm", "s": "ss", - "ah": "B h", - "hm": "B h:mm", + "ah": "a h", + "hm": "a h:mm", "ms": "mm:ss", - "ahm": "hB h:mm", - "hms": "B h:mm:ss", - "hmz": "z B h:mm", - "ahmz": "z hB h:mm", - "ahms": "hB h:mm:ss", - "hmsz": "z B h:mm:ss", - "ahmsz": "z hB h:mm:ss" + "ahm": "a h:mm", + "hms": "a h:mm:ss", + "hmz": "z a h:mm", + "ahmz": "z a h:mm", + "ahms": "a h:mm:ss", + "hmsz": "z a h:mm:ss", + "ahmsz": "z a h:mm:ss" }, "24": { "h": "HH", "m": "mm", "s": "ss", "ah": "HH", - "hm": "B H:mm", + "hm": "H:mm", "ms": "mm:ss", - "ahm": "B H:mm", - "hms": "B HH:mm:ss", - "hmz": "z B H:mm", - "ahmz": "z B H:mm", - "ahms": "B HH:mm:ss", - "hmsz": "z B HH:mm:ss", - "ahmsz": "z B HH:mm:ss" + "ahm": "H:mm", + "hms": "HH:mm:ss", + "hmz": "z H:mm", + "ahmz": "z H:mm", + "ahms": "HH:mm:ss", + "hmsz": "z HH:mm:ss", + "ahmsz": "z HH:mm:ss" } }, "range": { @@ -100,56 +100,56 @@ "f": "{sy}၊ {sm} {sd} {st} – {et}", "l": "{sy}၊ {sd} {sm} {st} – {et}", "m": "{sy}၊ {sm} {sd} {st} – {et}", - "s": "{sd}-{sm}-{sy} {st} – {et}" + "s": "{sd}-{sm}-{sy}၊ {st} – {et}" }, "c01": { "f": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", "l": "{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}", "m": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", - "s": "{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}" + "s": "{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}" }, "c02": { "f": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", "l": "{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}", "m": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", - "s": "{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}" + "s": "{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}" }, "c03": { "f": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", "l": "{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}", "m": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", - "s": "{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}" + "s": "{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}" }, "c10": { "f": "{sy}၊ {sm} {sd} – {ed}", "l": "{sy}၊ {sd} {sm} – {ed} {em}", "m": "{sy}၊ {sm} {sd} – {ed}", - "s": "{sd} – {ed}-{em}-{ey}" + "s": "{sd} – {ed}-{em}-{ey}၊" }, "c11": { "f": "{sy}၊ {sm} {sd} – {em} {ed}", "l": "{sy}၊ {sd} {sm} – {ey}၊ {ed} {em}", "m": "{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}", - "s": "{sd}-{sm} – {ed}-{em}-{ey}" + "s": "{sd}-{sm} – {ed}-{em}-{ey}၊" }, "c12": { "f": "{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}", "l": "{sy}၊ {sd} {sm} – {ey}၊ {ed} {em}", "m": "{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}", - "s": "{sd}-{sm}-{sy} – {ed}-{em}-{ey}" + "s": "{sd}-{sm}-{sy}၊ – {ed}-{em}-{ey}၊" }, "c20": { "f": "{sy}၊ {sm} – {ey}၊ {em}", "l": "{sy}၊ {sm} – {ey}၊ {em}", "m": "{sy}၊ {sm} – {ey}၊ {em}", - "s": "{sm}-{sy} – {em}-{ey}" + "s": "{sm}-{sy}၊ – {em}-{ey}၊" }, "c30": { - "f": "{sy} – {ey}", - "l": "{sy} – {ey}", - "m": "{sy} – {ey}", - "s": "{sy} – {ey}" + "f": "{sy}၊ – {ey}၊", + "l": "{sy}၊ – {ey}၊", + "m": "{sy}၊ – {ey}၊", + "s": "{sy}၊ – {ey}၊" } } } -} \ No newline at end of file +} diff --git a/js/test/date/testdatefmt_my_MM.js b/js/test/date/testdatefmt_my_MM.js index d786de831d..27be23868d 100644 --- a/js/test/date/testdatefmt_my_MM.js +++ b/js/test/date/testdatefmt_my_MM.js @@ -59,7 +59,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '29-09-11'); + test.equal(fmt.format(date), '29-09-11၊'); test.done(); }, @@ -135,7 +135,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), 'B 13:45'); + test.equal(fmt.format(date), '13:45'); test.done(); }, @@ -154,7 +154,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), 'B 13:45'); + test.equal(fmt.format(date), '13:45'); test.done(); }, @@ -173,7 +173,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), 'B 13:45'); + test.equal(fmt.format(date), '13:45'); test.done(); }, @@ -192,7 +192,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), 'B 1:45'); + test.equal(fmt.format(date), '1:45'); test.done(); }, @@ -211,7 +211,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '29-09-11 B 13:45'); + test.equal(fmt.format(date), '29-09-11၊ 13:45'); test.done(); }, @@ -230,7 +230,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '2011၊ စက် 29 B 13:45'); + test.equal(fmt.format(date), '2011၊ စက် 29 13:45'); test.done(); }, @@ -249,7 +249,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '2011၊ 29 စက်တင်ဘာ B 13:45'); + test.equal(fmt.format(date), '2011၊ 29 စက်တင်ဘာ 13:45'); test.done(); }, @@ -268,7 +268,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '2011၊ စက်တင်ဘာ 29 B 13:45'); + test.equal(fmt.format(date), '2011၊ စက်တင်ဘာ 29 13:45'); test.done(); }, @@ -479,7 +479,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '29-09-11'); + test.equal(fmt.format(date), '29-09-11၊'); test.done(); }, @@ -498,7 +498,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), 'B 13:45'); + test.equal(fmt.format(date), '13:45'); test.done(); }, @@ -517,7 +517,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '29-09-11 B 13:45'); + test.equal(fmt.format(date), '29-09-11၊ 13:45'); test.done(); }, @@ -631,7 +631,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '09-11'); + test.equal(fmt.format(date), '09-11၊'); test.done(); }, @@ -650,7 +650,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '29-09-11'); + test.equal(fmt.format(date), '29-09-11၊'); test.done(); }, @@ -954,7 +954,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "B 13:45"); + test.equal(fmt.format(date), "13:45"); test.done(); }, @@ -973,7 +973,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "B 13:45:37"); + test.equal(fmt.format(date), "13:45:37"); test.done(); }, @@ -992,7 +992,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "B 13:45"); + test.equal(fmt.format(date), "13:45"); test.done(); }, @@ -1017,7 +1017,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC B 13:45"); + test.equal(fmt.format(date), "UTC 13:45"); test.done(); }, @@ -1042,7 +1042,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC B 13:45"); + test.equal(fmt.format(date), "UTC 13:45"); test.done(); }, @@ -1061,7 +1061,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "B 13:45:37"); + test.equal(fmt.format(date), "13:45:37"); test.done(); }, @@ -1086,7 +1086,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC B 13:45:37"); + test.equal(fmt.format(date), "UTC 13:45:37"); test.done(); }, @@ -1111,7 +1111,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC B 13:45:37"); + test.equal(fmt.format(date), "UTC 13:45:37"); test.done(); }, @@ -1206,7 +1206,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "B 13:45"); + test.equal(fmt.format(date), "13:45"); test.done(); }, @@ -1225,7 +1225,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "B 13:45:37"); + test.equal(fmt.format(date), "13:45:37"); test.done(); }, @@ -1250,7 +1250,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "B 13:45"); + test.equal(fmt.format(date), "13:45"); test.done(); }, @@ -1276,7 +1276,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC B 13:45"); + test.equal(fmt.format(date), "UTC 13:45"); test.done(); }, @@ -1302,7 +1302,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC B 13:45"); + test.equal(fmt.format(date), "UTC 13:45"); test.done(); }, @@ -1321,7 +1321,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "B 13:45:37"); + test.equal(fmt.format(date), "13:45:37"); test.done(); }, @@ -1347,7 +1347,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC B 13:45:37"); + test.equal(fmt.format(date), "UTC 13:45:37"); test.done(); }, @@ -1373,7 +1373,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC B 13:45:37"); + test.equal(fmt.format(date), "UTC 13:45:37"); test.done(); }, @@ -1399,7 +1399,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC B 13:45:37"); + test.equal(fmt.format(date), "UTC 13:45:37"); test.done(); }, diff --git a/js/test/date/testdatetimefmt.js b/js/test/date/testdatetimefmt.js index 8e09dbf295..ba4aa2859b 100644 --- a/js/test/date/testdatetimefmt.js +++ b/js/test/date/testdatetimefmt.js @@ -5174,11 +5174,11 @@ module.exports.testdatetimeformat = { result1 = new DateFmt({locale:"my-MM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template; result2 = new DateFmt({locale:"my-MM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template; - test.equal(result1, "yyyy၊ MMMM d၊ EEEE B H:mm"); - test.equal(result2, "dd-MM-yy၊ E B H:mm"); + test.equal(result1, "yyyy၊ MMMM d၊ EEEE H:mm"); + test.equal(result2, "dd-MM-yy၊ E H:mm"); result1 = new DateFmt({locale:"my-MM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template; - test.equal(result1, "z B HH:mm:ss"); + test.equal(result1, "z HH:mm:ss"); test.done(); } diff --git a/js/test/daterange/testdatefmtrange_fmttemplate.js b/js/test/daterange/testdatefmtrange_fmttemplate.js index 0b36859b72..d9fe8aff73 100644 --- a/js/test/daterange/testdatefmtrange_fmttemplate.js +++ b/js/test/daterange/testdatefmtrange_fmttemplate.js @@ -13969,47 +13969,47 @@ module.exports.testdaterangefmt = { test.equal(templatec00[0], '{sy}၊ {sm} {sd} {st} – {et}'); test.equal(templatec00[1], '{sy}၊ {sd} {sm} {st} – {et}'); test.equal(templatec00[2], '{sy}၊ {sm} {sd} {st} – {et}'); - test.equal(templatec00[3], '{sd}-{sm}-{sy} {st} – {et}'); + test.equal(templatec00[3], '{sd}-{sm}-{sy}၊ {st} – {et}'); test.equal(templatec01[0], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); test.equal(templatec01[1], '{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}'); test.equal(templatec01[2], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); - test.equal(templatec01[3], '{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}'); + test.equal(templatec01[3], '{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}'); test.equal(templatec02[1], '{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}'); test.equal(templatec02[0], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); test.equal(templatec02[2], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); - test.equal(templatec02[3], '{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}'); + test.equal(templatec02[3], '{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}'); test.equal(templatec03[0], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); test.equal(templatec03[1], '{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}'); test.equal(templatec03[2], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); - test.equal(templatec03[3], '{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}'); + test.equal(templatec03[3], '{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}'); test.equal(templatec10[0], '{sy}၊ {sm} {sd} – {ed}'); test.equal(templatec10[1], '{sy}၊ {sd} {sm} – {ed} {em}'); test.equal(templatec10[2], '{sy}၊ {sm} {sd} – {ed}'); - test.equal(templatec10[3], '{sd} – {ed}-{em}-{ey}'); + test.equal(templatec10[3], '{sd} – {ed}-{em}-{ey}၊'); test.equal(templatec11[0], '{sy}၊ {sm} {sd} – {em} {ed}'); test.equal(templatec11[1], '{sy}၊ {sd} {sm} – {ey}၊ {ed} {em}'); test.equal(templatec11[2], '{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}'); - test.equal(templatec11[3], '{sd}-{sm} – {ed}-{em}-{ey}'); + test.equal(templatec11[3], '{sd}-{sm} – {ed}-{em}-{ey}၊'); test.equal(templatec12[0], '{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}'); test.equal(templatec12[1], '{sy}၊ {sd} {sm} – {ey}၊ {ed} {em}'); test.equal(templatec12[2], '{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}'); - test.equal(templatec12[3], '{sd}-{sm}-{sy} – {ed}-{em}-{ey}'); + test.equal(templatec12[3], '{sd}-{sm}-{sy}၊ – {ed}-{em}-{ey}၊'); test.equal(templatec20[0], '{sy}၊ {sm} – {ey}၊ {em}'); test.equal(templatec20[1], '{sy}၊ {sm} – {ey}၊ {em}'); test.equal(templatec20[2], '{sy}၊ {sm} – {ey}၊ {em}'); - test.equal(templatec20[3], '{sm}-{sy} – {em}-{ey}'); + test.equal(templatec20[3], '{sm}-{sy}၊ – {em}-{ey}၊'); - test.equal(templatec30[0], "{sy} – {ey}"); - test.equal(templatec30[1], "{sy} – {ey}"); - test.equal(templatec30[2], "{sy} – {ey}"); - test.equal(templatec30[3], "{sy} – {ey}"); + test.equal(templatec30[0], "{sy}၊ – {ey}၊"); + test.equal(templatec30[1], "{sy}၊ – {ey}၊"); + test.equal(templatec30[2], "{sy}၊ – {ey}၊"); + test.equal(templatec30[3], "{sy}၊ – {ey}၊"); test.done(); } diff --git a/js/test/daterange/testdatefmtrange_my_MM.js b/js/test/daterange/testdatefmtrange_my_MM.js index 025de700f3..44b8878b98 100644 --- a/js/test/daterange/testdatefmtrange_my_MM.js +++ b/js/test/daterange/testdatefmtrange_my_MM.js @@ -57,7 +57,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '31-12-11 B 13:45 – B 14:30'); + test.equal(fmt.format(start, end), '31-12-11၊ 13:45 – 14:30'); test.done(); }, testDateRngFmtmyMMRangeInDayMedium: function(test) { @@ -83,7 +83,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '2011၊ ဒီ 31 B 13:45 – B 14:30'); + test.equal(fmt.format(start, end), '2011၊ ဒီ 31 13:45 – 14:30'); test.done(); }, testDateRngFmtmyMMRangeInDayLong: function(test) { @@ -109,7 +109,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '2011၊ 31 ဒီဇင်ဘာ B 13:45 – B 14:30'); + test.equal(fmt.format(start, end), '2011၊ 31 ဒီဇင်ဘာ 13:45 – 14:30'); test.done(); }, testDateRngFmtmyMMRangeInDayFull: function(test) { @@ -135,7 +135,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '2011၊ ဒီဇင်ဘာ 31 B 13:45 – B 14:30' ); + test.equal(fmt.format(start, end), '2011၊ ဒီဇင်ဘာ 31 13:45 – 14:30' ); test.done(); }, @@ -162,7 +162,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '30-12-11 B 13:45 – 31-12-11 B 14:30'); + test.equal(fmt.format(start, end), '30-12-11၊ 13:45 – 31-12-11၊ 14:30'); test.done(); }, testDateRngFmtmyMMRangeNextDayMedium: function(test) { @@ -188,7 +188,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '2011၊ ဒီ 30 B 13:45 – 2011၊ ဒီ 31 B 14:30'); + test.equal(fmt.format(start, end), '2011၊ ဒီ 30 13:45 – 2011၊ ဒီ 31 14:30'); test.done(); }, testDateRngFmtmyMMRangeNextDayLong: function(test) { @@ -214,7 +214,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '2011၊ 30 ဒီဇင်ဘာ B 13:45 – 2011၊ 31 ဒီဇင်ဘာ B 14:30'); + test.equal(fmt.format(start, end), '2011၊ 30 ဒီဇင်ဘာ 13:45 – 2011၊ 31 ဒီဇင်ဘာ 14:30'); test.done(); }, testDateRngFmtmyMMRangeNextDayFull: function(test) { @@ -240,7 +240,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '2011၊ ဒီဇင်ဘာ 30 B 13:45 – 2011၊ ဒီဇင်ဘာ 31 B 14:30'); + test.equal(fmt.format(start, end), '2011၊ ဒီဇင်ဘာ 30 13:45 – 2011၊ ဒီဇင်ဘာ 31 14:30'); test.done(); }, @@ -267,7 +267,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '20 – 31-12-11'); + test.equal(fmt.format(start, end), '20 – 31-12-11၊'); test.done(); }, testDateRngFmtmyMMRangeMultiDayMedium: function(test) { @@ -372,7 +372,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '20-11 – 31-12-11'); + test.equal(fmt.format(start, end), '20-11 – 31-12-11၊'); test.done(); }, testDateRngFmtmyMMRangeNextMonthMedium: function(test) { @@ -477,7 +477,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '20-11-11 – 31-01-12'); + test.equal(fmt.format(start, end), '20-11-11၊ – 31-01-12၊'); test.done(); }, testDateRngFmtmyMMRangeNextYearMedium: function(test) { @@ -582,7 +582,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '11-11 – 01-14'); + test.equal(fmt.format(start, end), '11-11၊ – 01-14၊'); test.done(); }, testDateRngFmtmyMMRangeMultiYearMedium: function(test) { @@ -686,7 +686,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), "2011 – 2064"); + test.equal(fmt.format(start, end), "2011၊ – 2064၊"); test.done(); } }; \ No newline at end of file From 348830eb6de6abd8aef1332ae00d3dd5616ab52b Mon Sep 17 00:00:00 2001 From: Goun Lee Date: Wed, 2 Sep 2020 09:49:55 +0900 Subject: [PATCH 7/8] =?UTF-8?q?Remove=20=E1=81=8Acharacter=20in=20some=20d?= =?UTF-8?q?ata=20format=20and=20fixed=20related=20test=20caese?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/data/locale/my/dateformats.json | 28 +++++++++---------- js/test/date/testdatefmt_my_MM.js | 12 ++++---- .../daterange/testdatefmtrange_fmttemplate.js | 24 ++++++++-------- js/test/daterange/testdatefmtrange_my_MM.js | 14 +++++----- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/js/data/locale/my/dateformats.json b/js/data/locale/my/dateformats.json index 8b65b8747c..c7372d3327 100644 --- a/js/data/locale/my/dateformats.json +++ b/js/data/locale/my/dateformats.json @@ -12,7 +12,7 @@ "f": "yyyy၊ MMMM d", "l": "yyyy၊ d MMMM", "m": "yyyy၊ MMM d", - "s": "dd-MM-yy၊" + "s": "dd-MM-yy" }, "dmw": { "f": "MMMM d၊ EEEE", @@ -30,7 +30,7 @@ "f": "yyyy၊ MMMM", "l": "yyyy၊ MMMM", "m": "yyyy၊ MMM", - "s": "MM-yy၊" + "s": "MM-yy" }, "dw": { "f": "d၊ EEEE", @@ -100,55 +100,55 @@ "f": "{sy}၊ {sm} {sd} {st} – {et}", "l": "{sy}၊ {sd} {sm} {st} – {et}", "m": "{sy}၊ {sm} {sd} {st} – {et}", - "s": "{sd}-{sm}-{sy}၊ {st} – {et}" + "s": "{sd}-{sm}-{sy} {st} – {et}" }, "c01": { "f": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", "l": "{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}", "m": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", - "s": "{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}" + "s": "{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}" }, "c02": { "f": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", "l": "{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}", "m": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", - "s": "{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}" + "s": "{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}" }, "c03": { "f": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", "l": "{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}", "m": "{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}", - "s": "{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}" + "s": "{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}" }, "c10": { "f": "{sy}၊ {sm} {sd} – {ed}", "l": "{sy}၊ {sd} {sm} – {ed} {em}", "m": "{sy}၊ {sm} {sd} – {ed}", - "s": "{sd} – {ed}-{em}-{ey}၊" + "s": "{sd} – {ed}-{em}-{ey}" }, "c11": { "f": "{sy}၊ {sm} {sd} – {em} {ed}", "l": "{sy}၊ {sd} {sm} – {ey}၊ {ed} {em}", "m": "{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}", - "s": "{sd}-{sm} – {ed}-{em}-{ey}၊" + "s": "{sd}-{sm} – {ed}-{em}-{ey}" }, "c12": { "f": "{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}", "l": "{sy}၊ {sd} {sm} – {ey}၊ {ed} {em}", "m": "{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}", - "s": "{sd}-{sm}-{sy}၊ – {ed}-{em}-{ey}၊" + "s": "{sd}-{sm}-{sy} – {ed}-{em}-{ey}" }, "c20": { "f": "{sy}၊ {sm} – {ey}၊ {em}", "l": "{sy}၊ {sm} – {ey}၊ {em}", "m": "{sy}၊ {sm} – {ey}၊ {em}", - "s": "{sm}-{sy}၊ – {em}-{ey}၊" + "s": "{sm}-{sy} – {em}-{ey}" }, "c30": { - "f": "{sy}၊ – {ey}၊", - "l": "{sy}၊ – {ey}၊", - "m": "{sy}၊ – {ey}၊", - "s": "{sy}၊ – {ey}၊" + "f": "{sy} – {ey}", + "l": "{sy} – {ey}", + "m": "{sy} – {ey}", + "s": "{sy} – {ey}" } } } diff --git a/js/test/date/testdatefmt_my_MM.js b/js/test/date/testdatefmt_my_MM.js index 27be23868d..8c561ddeed 100644 --- a/js/test/date/testdatefmt_my_MM.js +++ b/js/test/date/testdatefmt_my_MM.js @@ -59,7 +59,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '29-09-11၊'); + test.equal(fmt.format(date), '29-09-11'); test.done(); }, @@ -211,7 +211,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '29-09-11၊ 13:45'); + test.equal(fmt.format(date), '29-09-11 13:45'); test.done(); }, @@ -479,7 +479,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '29-09-11၊'); + test.equal(fmt.format(date), '29-09-11'); test.done(); }, @@ -517,7 +517,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '29-09-11၊ 13:45'); + test.equal(fmt.format(date), '29-09-11 13:45'); test.done(); }, @@ -631,7 +631,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '09-11၊'); + test.equal(fmt.format(date), '09-11'); test.done(); }, @@ -650,7 +650,7 @@ module.exports.testdatefmt_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(date), '29-09-11၊'); + test.equal(fmt.format(date), '29-09-11'); test.done(); }, diff --git a/js/test/daterange/testdatefmtrange_fmttemplate.js b/js/test/daterange/testdatefmtrange_fmttemplate.js index d9fe8aff73..0b36859b72 100644 --- a/js/test/daterange/testdatefmtrange_fmttemplate.js +++ b/js/test/daterange/testdatefmtrange_fmttemplate.js @@ -13969,47 +13969,47 @@ module.exports.testdaterangefmt = { test.equal(templatec00[0], '{sy}၊ {sm} {sd} {st} – {et}'); test.equal(templatec00[1], '{sy}၊ {sd} {sm} {st} – {et}'); test.equal(templatec00[2], '{sy}၊ {sm} {sd} {st} – {et}'); - test.equal(templatec00[3], '{sd}-{sm}-{sy}၊ {st} – {et}'); + test.equal(templatec00[3], '{sd}-{sm}-{sy} {st} – {et}'); test.equal(templatec01[0], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); test.equal(templatec01[1], '{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}'); test.equal(templatec01[2], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); - test.equal(templatec01[3], '{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}'); + test.equal(templatec01[3], '{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}'); test.equal(templatec02[1], '{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}'); test.equal(templatec02[0], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); test.equal(templatec02[2], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); - test.equal(templatec02[3], '{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}'); + test.equal(templatec02[3], '{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}'); test.equal(templatec03[0], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); test.equal(templatec03[1], '{sy}၊ {sd} {sm} {st} – {ey}၊ {ed} {em} {et}'); test.equal(templatec03[2], '{sy}၊ {sm} {sd} {st} – {ey}၊ {em} {ed} {et}'); - test.equal(templatec03[3], '{sd}-{sm}-{sy}၊ {st} – {ed}-{em}-{ey}၊ {et}'); + test.equal(templatec03[3], '{sd}-{sm}-{sy} {st} – {ed}-{em}-{ey} {et}'); test.equal(templatec10[0], '{sy}၊ {sm} {sd} – {ed}'); test.equal(templatec10[1], '{sy}၊ {sd} {sm} – {ed} {em}'); test.equal(templatec10[2], '{sy}၊ {sm} {sd} – {ed}'); - test.equal(templatec10[3], '{sd} – {ed}-{em}-{ey}၊'); + test.equal(templatec10[3], '{sd} – {ed}-{em}-{ey}'); test.equal(templatec11[0], '{sy}၊ {sm} {sd} – {em} {ed}'); test.equal(templatec11[1], '{sy}၊ {sd} {sm} – {ey}၊ {ed} {em}'); test.equal(templatec11[2], '{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}'); - test.equal(templatec11[3], '{sd}-{sm} – {ed}-{em}-{ey}၊'); + test.equal(templatec11[3], '{sd}-{sm} – {ed}-{em}-{ey}'); test.equal(templatec12[0], '{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}'); test.equal(templatec12[1], '{sy}၊ {sd} {sm} – {ey}၊ {ed} {em}'); test.equal(templatec12[2], '{sy}၊ {sm} {sd} – {ey}၊ {em} {ed}'); - test.equal(templatec12[3], '{sd}-{sm}-{sy}၊ – {ed}-{em}-{ey}၊'); + test.equal(templatec12[3], '{sd}-{sm}-{sy} – {ed}-{em}-{ey}'); test.equal(templatec20[0], '{sy}၊ {sm} – {ey}၊ {em}'); test.equal(templatec20[1], '{sy}၊ {sm} – {ey}၊ {em}'); test.equal(templatec20[2], '{sy}၊ {sm} – {ey}၊ {em}'); - test.equal(templatec20[3], '{sm}-{sy}၊ – {em}-{ey}၊'); + test.equal(templatec20[3], '{sm}-{sy} – {em}-{ey}'); - test.equal(templatec30[0], "{sy}၊ – {ey}၊"); - test.equal(templatec30[1], "{sy}၊ – {ey}၊"); - test.equal(templatec30[2], "{sy}၊ – {ey}၊"); - test.equal(templatec30[3], "{sy}၊ – {ey}၊"); + test.equal(templatec30[0], "{sy} – {ey}"); + test.equal(templatec30[1], "{sy} – {ey}"); + test.equal(templatec30[2], "{sy} – {ey}"); + test.equal(templatec30[3], "{sy} – {ey}"); test.done(); } diff --git a/js/test/daterange/testdatefmtrange_my_MM.js b/js/test/daterange/testdatefmtrange_my_MM.js index 44b8878b98..893e4906f4 100644 --- a/js/test/daterange/testdatefmtrange_my_MM.js +++ b/js/test/daterange/testdatefmtrange_my_MM.js @@ -57,7 +57,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '31-12-11၊ 13:45 – 14:30'); + test.equal(fmt.format(start, end), '31-12-11 13:45 – 14:30'); test.done(); }, testDateRngFmtmyMMRangeInDayMedium: function(test) { @@ -162,7 +162,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '30-12-11၊ 13:45 – 31-12-11၊ 14:30'); + test.equal(fmt.format(start, end), '30-12-11 13:45 – 31-12-11 14:30'); test.done(); }, testDateRngFmtmyMMRangeNextDayMedium: function(test) { @@ -267,7 +267,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '20 – 31-12-11၊'); + test.equal(fmt.format(start, end), '20 – 31-12-11'); test.done(); }, testDateRngFmtmyMMRangeMultiDayMedium: function(test) { @@ -372,7 +372,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '20-11 – 31-12-11၊'); + test.equal(fmt.format(start, end), '20-11 – 31-12-11'); test.done(); }, testDateRngFmtmyMMRangeNextMonthMedium: function(test) { @@ -477,7 +477,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '20-11-11၊ – 31-01-12၊'); + test.equal(fmt.format(start, end), '20-11-11 – 31-01-12'); test.done(); }, testDateRngFmtmyMMRangeNextYearMedium: function(test) { @@ -582,7 +582,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), '11-11၊ – 01-14၊'); + test.equal(fmt.format(start, end), '11-11 – 01-14'); test.done(); }, testDateRngFmtmyMMRangeMultiYearMedium: function(test) { @@ -686,7 +686,7 @@ module.exports.testdatefmtrange_my_MM = { second: 0, millisecond: 0 }); - test.equal(fmt.format(start, end), "2011၊ – 2064၊"); + test.equal(fmt.format(start, end), "2011 – 2064"); test.done(); } }; \ No newline at end of file From 554bbcf60d739b64b608e1474957db379f229f17 Mon Sep 17 00:00:00 2001 From: Goun Lee Date: Wed, 2 Sep 2020 14:28:47 +0900 Subject: [PATCH 8/8] Fixed default timezone in my-MM, fixed related test cases --- docs/ReleaseNotes.md | 1 + js/data/locale/und/MM/timezone.jf | 2 +- js/test/date/testdatefmt_my_MM.js | 36 +++++++++++++++---------------- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md index 591e93ffec..95d5ed91c2 100644 --- a/docs/ReleaseNotes.md +++ b/docs/ReleaseNotes.md @@ -11,6 +11,7 @@ Bug Fixes: * Updated to IANA time zone data 2020a * Put base option back on ResBundle * Fixed a few tools and dependencies so that ilib works on node v14 +* Fixed a default timezone in `my-MM` to `Asia/Yangon` Build 009 ------- diff --git a/js/data/locale/und/MM/timezone.jf b/js/data/locale/und/MM/timezone.jf index 49943b650c..130cfa14b5 100644 --- a/js/data/locale/und/MM/timezone.jf +++ b/js/data/locale/und/MM/timezone.jf @@ -1 +1 @@ -{"timezone": "Asia/Rangoon"} +{"timezone": "Asia/Yangon"} diff --git a/js/test/date/testdatefmt_my_MM.js b/js/test/date/testdatefmt_my_MM.js index 8c561ddeed..a255544631 100644 --- a/js/test/date/testdatefmt_my_MM.js +++ b/js/test/date/testdatefmt_my_MM.js @@ -1002,7 +1002,7 @@ module.exports.testdatefmt_my_MM = { locale: "my-MM", type: "time", time: "hmz", - timezone: "Asia/Rangoon", + timezone: "Asia/Yangon", useNative: false }); test.ok(fmt !== null); @@ -1017,7 +1017,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC 13:45"); + test.equal(fmt.format(date), "+0630 13:45"); test.done(); }, @@ -1027,7 +1027,7 @@ module.exports.testdatefmt_my_MM = { locale: "my-MM", type: "time", time: "hmaz", - timezone: "Asia/Rangoon", + timezone: "Asia/Yangon", useNative: false }); test.ok(fmt !== null); @@ -1042,7 +1042,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC 13:45"); + test.equal(fmt.format(date), "+0630 13:45"); test.done(); }, @@ -1071,7 +1071,7 @@ module.exports.testdatefmt_my_MM = { locale: "my-MM", type: "time", time: "hmsz", - timezone: "Asia/Rangoon", + timezone: "Asia/Yangon", useNative: false }); test.ok(fmt !== null); @@ -1086,7 +1086,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC 13:45:37"); + test.equal(fmt.format(date), "+0630 13:45:37"); test.done(); }, @@ -1096,7 +1096,7 @@ module.exports.testdatefmt_my_MM = { locale: "my-MM", type: "time", time: "hmsaz", - timezone: "Asia/Rangoon", + timezone: "Asia/Yangon", useNative: false }); test.ok(fmt !== null); @@ -1111,7 +1111,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC 13:45:37"); + test.equal(fmt.format(date), "+0630 13:45:37"); test.done(); }, @@ -1261,7 +1261,7 @@ module.exports.testdatefmt_my_MM = { type: "time", length: "full", time: "hmz", - timezone: "Asia/Rangoon", + timezone: "Asia/Yangon", useNative: false }); test.ok(fmt !== null); @@ -1276,7 +1276,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC 13:45"); + test.equal(fmt.format(date), "+0630 13:45"); test.done(); }, @@ -1287,7 +1287,7 @@ module.exports.testdatefmt_my_MM = { type: "time", length: "full", time: "hmaz", - timezone: "Asia/Rangoon", + timezone: "Asia/Yangon", useNative: false }); test.ok(fmt !== null); @@ -1302,7 +1302,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC 13:45"); + test.equal(fmt.format(date), "+0630 13:45"); test.done(); }, @@ -1332,7 +1332,7 @@ module.exports.testdatefmt_my_MM = { type: "time", length: "full", time: "hmsz", - timezone: "Asia/Rangoon", + timezone: "Asia/Yangon", useNative: false }); test.ok(fmt !== null); @@ -1347,7 +1347,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC 13:45:37"); + test.equal(fmt.format(date), "+0630 13:45:37"); test.done(); }, @@ -1358,7 +1358,7 @@ module.exports.testdatefmt_my_MM = { type: "time", length: "full", time: "hmsaz", - timezone: "Asia/Rangoon", + timezone: "Asia/Yangon", useNative: false }); test.ok(fmt !== null); @@ -1373,7 +1373,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC 13:45:37"); + test.equal(fmt.format(date), "+0630 13:45:37"); test.done(); }, @@ -1384,7 +1384,7 @@ module.exports.testdatefmt_my_MM = { type: "time", length: "full", time: "hmsz", - timezone: "Asia/Rangoon", + timezone: "Asia/Yangon", useNative: false }); test.ok(fmt !== null); @@ -1399,7 +1399,7 @@ module.exports.testdatefmt_my_MM = { second: 37, millisecond: 0 }); - test.equal(fmt.format(date), "UTC 13:45:37"); + test.equal(fmt.format(date), "+0630 13:45:37"); test.done(); },