diff --git a/test/intl402/DateTimeFormat/prototype/format/timedatestyle-en.js b/test/intl402/DateTimeFormat/prototype/format/timedatestyle-en.js index f0bd8c128c..76344206ac 100644 --- a/test/intl402/DateTimeFormat/prototype/format/timedatestyle-en.js +++ b/test/intl402/DateTimeFormat/prototype/format/timedatestyle-en.js @@ -17,10 +17,10 @@ const dateOptions = [ ]; const timeOptions = [ - ["full", "2:12:47 PM Coordinated Universal Time", "14:12:47 Coordinated Universal Time"], - ["long", "2:12:47 PM UTC", "14:12:47 UTC"], - ["medium", "2:12:47 PM", "14:12:47"], - ["short", "2:12 PM", "14:12"], + ["full", "2:12:47\u{202F}PM Coordinated Universal Time", "14:12:47 Coordinated Universal Time"], + ["long", "2:12:47\u{202F}PM UTC", "14:12:47 UTC"], + ["medium", "2:12:47\u{202F}PM", "14:12:47"], + ["short", "2:12\u{202F}PM", "14:12"], ]; const options12 = [ diff --git a/test/intl402/DateTimeFormat/prototype/formatRange/en-US.js b/test/intl402/DateTimeFormat/prototype/formatRange/en-US.js index a5560417cd..73726d775f 100644 --- a/test/intl402/DateTimeFormat/prototype/formatRange/en-US.js +++ b/test/intl402/DateTimeFormat/prototype/formatRange/en-US.js @@ -19,18 +19,18 @@ const date4 = new Date("2020-03-04T00:00:00"); let dtf = new Intl.DateTimeFormat("en-US"); assert.sameValue(dtf.formatRange(date1, date1), "1/3/2019"); -assert.sameValue(dtf.formatRange(date1, date2), "1/3/2019 – 1/5/2019"); -assert.sameValue(dtf.formatRange(date1, date3), "1/3/2019 – 3/4/2019"); -assert.sameValue(dtf.formatRange(date1, date4), "1/3/2019 – 3/4/2020"); -assert.sameValue(dtf.formatRange(date2, date3), "1/5/2019 – 3/4/2019"); -assert.sameValue(dtf.formatRange(date2, date4), "1/5/2019 – 3/4/2020"); -assert.sameValue(dtf.formatRange(date3, date4), "3/4/2019 – 3/4/2020"); +assert.sameValue(dtf.formatRange(date1, date2), "1/3/2019\u{2009}\u{2013}\u{2009}1/5/2019"); +assert.sameValue(dtf.formatRange(date1, date3), "1/3/2019\u{2009}\u{2013}\u{2009}3/4/2019"); +assert.sameValue(dtf.formatRange(date1, date4), "1/3/2019\u{2009}\u{2013}\u{2009}3/4/2020"); +assert.sameValue(dtf.formatRange(date2, date3), "1/5/2019\u{2009}\u{2013}\u{2009}3/4/2019"); +assert.sameValue(dtf.formatRange(date2, date4), "1/5/2019\u{2009}\u{2013}\u{2009}3/4/2020"); +assert.sameValue(dtf.formatRange(date3, date4), "3/4/2019\u{2009}\u{2013}\u{2009}3/4/2020"); dtf = new Intl.DateTimeFormat("en-US", {year: "numeric", month: "short", day: "numeric"}); assert.sameValue(dtf.formatRange(date1, date1), "Jan 3, 2019"); -assert.sameValue(dtf.formatRange(date1, date2), "Jan 3 – 5, 2019"); -assert.sameValue(dtf.formatRange(date1, date3), "Jan 3 – Mar 4, 2019"); -assert.sameValue(dtf.formatRange(date1, date4), "Jan 3, 2019 – Mar 4, 2020"); -assert.sameValue(dtf.formatRange(date2, date3), "Jan 5 – Mar 4, 2019"); -assert.sameValue(dtf.formatRange(date2, date4), "Jan 5, 2019 – Mar 4, 2020"); -assert.sameValue(dtf.formatRange(date3, date4), "Mar 4, 2019 – Mar 4, 2020"); +assert.sameValue(dtf.formatRange(date1, date2), "Jan 3\u{2009}\u{2013}\u{2009}5, 2019"); +assert.sameValue(dtf.formatRange(date1, date3), "Jan 3\u{2009}\u{2013}\u{2009}Mar 4, 2019"); +assert.sameValue(dtf.formatRange(date1, date4), "Jan 3, 2019\u{2009}\u{2013}\u{2009}Mar 4, 2020"); +assert.sameValue(dtf.formatRange(date2, date3), "Jan 5\u{2009}\u{2013}\u{2009}Mar 4, 2019"); +assert.sameValue(dtf.formatRange(date2, date4), "Jan 5, 2019\u{2009}\u{2013}\u{2009}Mar 4, 2020"); +assert.sameValue(dtf.formatRange(date3, date4), "Mar 4, 2019\u{2009}\u{2013}\u{2009}Mar 4, 2020"); diff --git a/test/intl402/DateTimeFormat/prototype/formatRange/fractionalSecondDigits.js b/test/intl402/DateTimeFormat/prototype/formatRange/fractionalSecondDigits.js index 2f0cb0f187..86f8ea1dd9 100644 --- a/test/intl402/DateTimeFormat/prototype/formatRange/fractionalSecondDigits.js +++ b/test/intl402/DateTimeFormat/prototype/formatRange/fractionalSecondDigits.js @@ -15,19 +15,19 @@ const d3 = new Date(2019, 7, 10, 1, 2, 13, 987); let dtf = new Intl.DateTimeFormat( 'en', { minute: "numeric", second: "numeric", fractionalSecondDigits: undefined}); assert.sameValue(dtf.formatRange(d1, d2), "02:03", "no fractionalSecondDigits"); -assert.sameValue(dtf.formatRange(d1, d3), "02:03 – 02:13", "no fractionalSecondDigits"); +assert.sameValue(dtf.formatRange(d1, d3), "02:03\u{2009}\u{2013}\u{2009}02:13", "no fractionalSecondDigits"); dtf = new Intl.DateTimeFormat( 'en', { minute: "numeric", second: "numeric", fractionalSecondDigits: 1}); -assert.sameValue(dtf.formatRange(d1, d2), "02:03.2 – 02:03.5", "1 fractionalSecondDigits round down"); -assert.sameValue(dtf.formatRange(d1, d3), "02:03.2 – 02:13.9", "1 fractionalSecondDigits round down"); +assert.sameValue(dtf.formatRange(d1, d2), "02:03.2\u{2009}\u{2013}\u{2009}02:03.5", "1 fractionalSecondDigits round down"); +assert.sameValue(dtf.formatRange(d1, d3), "02:03.2\u{2009}\u{2013}\u{2009}02:13.9", "1 fractionalSecondDigits round down"); dtf = new Intl.DateTimeFormat( 'en', { minute: "numeric", second: "numeric", fractionalSecondDigits: 2}); -assert.sameValue(dtf.formatRange(d1, d2), "02:03.23 – 02:03.56", "2 fractionalSecondDigits round down"); -assert.sameValue(dtf.formatRange(d1, d3), "02:03.23 – 02:13.98", "2 fractionalSecondDigits round down"); +assert.sameValue(dtf.formatRange(d1, d2), "02:03.23\u{2009}\u{2013}\u{2009}02:03.56", "2 fractionalSecondDigits round down"); +assert.sameValue(dtf.formatRange(d1, d3), "02:03.23\u{2009}\u{2013}\u{2009}02:13.98", "2 fractionalSecondDigits round down"); dtf = new Intl.DateTimeFormat( 'en', { minute: "numeric", second: "numeric", fractionalSecondDigits: 3}); -assert.sameValue(dtf.formatRange(d1, d2), "02:03.234 – 02:03.567", "3 fractionalSecondDigits round down"); -assert.sameValue(dtf.formatRange(d1, d3), "02:03.234 – 02:13.987", "3 fractionalSecondDigits round down"); +assert.sameValue(dtf.formatRange(d1, d2), "02:03.234\u{2009}\u{2013}\u{2009}02:03.567", "3 fractionalSecondDigits round down"); +assert.sameValue(dtf.formatRange(d1, d3), "02:03.234\u{2009}\u{2013}\u{2009}02:13.987", "3 fractionalSecondDigits round down"); diff --git a/test/intl402/DateTimeFormat/prototype/formatRangeToParts/en-US.js b/test/intl402/DateTimeFormat/prototype/formatRangeToParts/en-US.js index 2a45d4ddfc..4e06957aec 100644 --- a/test/intl402/DateTimeFormat/prototype/formatRangeToParts/en-US.js +++ b/test/intl402/DateTimeFormat/prototype/formatRangeToParts/en-US.js @@ -46,7 +46,7 @@ compare(dtf.formatRangeToParts(date1, date2), [ { type: "day", value: "3", source: "startRange" }, { type: "literal", value: "/", source: "startRange" }, { type: "year", value: "2019", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "month", value: "1", source: "endRange" }, { type: "literal", value: "/", source: "endRange" }, { type: "day", value: "5", source: "endRange" }, @@ -59,7 +59,7 @@ compare(dtf.formatRangeToParts(date1, date3), [ { type: "day", value: "3", source: "startRange" }, { type: "literal", value: "/", source: "startRange" }, { type: "year", value: "2019", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "month", value: "3", source: "endRange" }, { type: "literal", value: "/", source: "endRange" }, { type: "day", value: "4", source: "endRange" }, @@ -72,7 +72,7 @@ compare(dtf.formatRangeToParts(date1, date4), [ { type: "day", value: "3", source: "startRange" }, { type: "literal", value: "/", source: "startRange" }, { type: "year", value: "2019", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "month", value: "3", source: "endRange" }, { type: "literal", value: "/", source: "endRange" }, { type: "day", value: "4", source: "endRange" }, @@ -85,7 +85,7 @@ compare(dtf.formatRangeToParts(date2, date3), [ { type: "day", value: "5", source: "startRange" }, { type: "literal", value: "/", source: "startRange" }, { type: "year", value: "2019", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "month", value: "3", source: "endRange" }, { type: "literal", value: "/", source: "endRange" }, { type: "day", value: "4", source: "endRange" }, @@ -98,7 +98,7 @@ compare(dtf.formatRangeToParts(date2, date4), [ { type: "day", value: "5", source: "startRange" }, { type: "literal", value: "/", source: "startRange" }, { type: "year", value: "2019", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "month", value: "3", source: "endRange" }, { type: "literal", value: "/", source: "endRange" }, { type: "day", value: "4", source: "endRange" }, @@ -111,7 +111,7 @@ compare(dtf.formatRangeToParts(date3, date4), [ { type: "day", value: "4", source: "startRange" }, { type: "literal", value: "/", source: "startRange" }, { type: "year", value: "2019", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "month", value: "3", source: "endRange" }, { type: "literal", value: "/", source: "endRange" }, { type: "day", value: "4", source: "endRange" }, @@ -131,7 +131,7 @@ compare(dtf.formatRangeToParts(date1, date2), [ { type: "month", value: "Jan", source: "shared" }, { type: "literal", value: " ", source: "shared" }, { type: "day", value: "3", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "day", value: "5", source: "endRange" }, { type: "literal", value: ", ", source: "shared" }, { type: "year", value: "2019", source: "shared" }, @@ -140,7 +140,7 @@ compare(dtf.formatRangeToParts(date1, date3), [ { type: "month", value: "Jan", source: "startRange" }, { type: "literal", value: " ", source: "startRange" }, { type: "day", value: "3", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "month", value: "Mar", source: "endRange" }, { type: "literal", value: " ", source: "endRange" }, { type: "day", value: "4", source: "endRange" }, @@ -153,7 +153,7 @@ compare(dtf.formatRangeToParts(date1, date4), [ { type: "day", value: "3", source: "startRange" }, { type: "literal", value: ", ", source: "startRange" }, { type: "year", value: "2019", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "month", value: "Mar", source: "endRange" }, { type: "literal", value: " ", source: "endRange" }, { type: "day", value: "4", source: "endRange" }, @@ -164,7 +164,7 @@ compare(dtf.formatRangeToParts(date2, date3), [ { type: "month", value: "Jan", source: "startRange" }, { type: "literal", value: " ", source: "startRange" }, { type: "day", value: "5", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "month", value: "Mar", source: "endRange" }, { type: "literal", value: " ", source: "endRange" }, { type: "day", value: "4", source: "endRange" }, @@ -177,7 +177,7 @@ compare(dtf.formatRangeToParts(date2, date4), [ { type: "day", value: "5", source: "startRange" }, { type: "literal", value: ", ", source: "startRange" }, { type: "year", value: "2019", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "month", value: "Mar", source: "endRange" }, { type: "literal", value: " ", source: "endRange" }, { type: "day", value: "4", source: "endRange" }, @@ -190,7 +190,7 @@ compare(dtf.formatRangeToParts(date3, date4), [ { type: "day", value: "4", source: "startRange" }, { type: "literal", value: ", ", source: "startRange" }, { type: "year", value: "2019", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "month", value: "Mar", source: "endRange" }, { type: "literal", value: " ", source: "endRange" }, { type: "day", value: "4", source: "endRange" }, diff --git a/test/intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js b/test/intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js index 1358bc8f6a..89a0104d4c 100644 --- a/test/intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js +++ b/test/intl402/DateTimeFormat/prototype/formatRangeToParts/fractionalSecondDigits.js @@ -50,7 +50,7 @@ compare(dtf.formatRangeToParts(d1, d3), [ { type: "minute", value: "02", source: "startRange" }, { type: "literal", value: ":", source: "startRange" }, { type: "second", value: "03", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "minute", value: "02", source: "endRange" }, { type: "literal", value: ":", source: "endRange" }, { type: "second", value: "13", source: "endRange" } @@ -65,7 +65,7 @@ compare(dtf.formatRangeToParts(d1, d2), [ { type: "second", value: "03", source: "startRange" }, { type: "literal", value: ".", source: "startRange" }, { type: "fractionalSecond", value: "2", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "minute", value: "02", source: "endRange" }, { type: "literal", value: ":", source: "endRange" }, { type: "second", value: "03", source: "endRange" }, @@ -79,7 +79,7 @@ compare(dtf.formatRangeToParts(d1, d3), [ { type: "second", value: "03", source: "startRange" }, { type: "literal", value: ".", source: "startRange" }, { type: "fractionalSecond", value: "2", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "minute", value: "02", source: "endRange" }, { type: "literal", value: ":", source: "endRange" }, { type: "second", value: "13", source: "endRange" }, @@ -96,7 +96,7 @@ compare(dtf.formatRangeToParts(d1, d2), [ { type: "second", value: "03", source: "startRange" }, { type: "literal", value: ".", source: "startRange" }, { type: "fractionalSecond", value: "23", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "minute", value: "02", source: "endRange" }, { type: "literal", value: ":", source: "endRange" }, { type: "second", value: "03", source: "endRange" }, @@ -110,7 +110,7 @@ compare(dtf.formatRangeToParts(d1, d3), [ { type: "second", value: "03", source: "startRange" }, { type: "literal", value: ".", source: "startRange" }, { type: "fractionalSecond", value: "23", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "minute", value: "02", source: "endRange" }, { type: "literal", value: ":", source: "endRange" }, { type: "second", value: "13", source: "endRange" }, @@ -127,7 +127,7 @@ compare(dtf.formatRangeToParts(d1, d2), [ { type: "second", value: "03", source: "startRange" }, { type: "literal", value: ".", source: "startRange" }, { type: "fractionalSecond", value: "234", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "minute", value: "02", source: "endRange" }, { type: "literal", value: ":", source: "endRange" }, { type: "second", value: "03", source: "endRange" }, @@ -141,7 +141,7 @@ compare(dtf.formatRangeToParts(d1, d3), [ { type: "second", value: "03", source: "startRange" }, { type: "literal", value: ".", source: "startRange" }, { type: "fractionalSecond", value: "234", source: "startRange" }, - { type: "literal", value: " \u2013 ", source: "shared" }, + { type: "literal", value: "\u2009\u2013\u2009", source: "shared" }, { type: "minute", value: "02", source: "endRange" }, { type: "literal", value: ":", source: "endRange" }, { type: "second", value: "13", source: "endRange" },