Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update expected results for day period to match CLDR 47 #4428

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions test/intl402/DateTimeFormat/prototype/format/dayPeriod-long-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ const long = new Intl.DateTimeFormat('en', {
dayPeriod: 'long'
});

assert.sameValue(long.format(d0000), 'at night', '00:00, long format');
assert.sameValue(long.format(d0100), 'at night', '01:00, long format');
assert.sameValue(long.format(d0200), 'at night', '02:00, long format');
assert.sameValue(long.format(d0300), 'at night', '03:00, long format');
assert.sameValue(long.format(d0400), 'at night', '04:00, long format');
assert.sameValue(long.format(d0500), 'at night', '05:00, long format');
assert.sameValue(long.format(d0000), 'in the morning', '00:00, long format');
assert.sameValue(long.format(d0100), 'in the morning', '01:00, long format');
assert.sameValue(long.format(d0200), 'in the morning', '02:00, long format');
assert.sameValue(long.format(d0300), 'in the morning', '03:00, long format');
assert.sameValue(long.format(d0400), 'in the morning', '04:00, long format');
assert.sameValue(long.format(d0500), 'in the morning', '05:00, long format');
assert.sameValue(long.format(d0600), 'in the morning', '06:00, long format');
assert.sameValue(long.format(d0700), 'in the morning', '07:00, long format');
assert.sameValue(long.format(d0800), 'in the morning', '08:00, long format');
Expand All @@ -67,12 +67,12 @@ const longNumeric = new Intl.DateTimeFormat('en', {
hour: 'numeric'
});

assert.sameValue(longNumeric.format(d0000), '12 at night', '00:00, long-numeric');
assert.sameValue(longNumeric.format(d0100), '1 at night', '01:00, long-numeric');
assert.sameValue(longNumeric.format(d0200), '2 at night', '02:00, long-numeric');
assert.sameValue(longNumeric.format(d0300), '3 at night', '03:00, long-numeric');
assert.sameValue(longNumeric.format(d0400), '4 at night', '04:00, long-numeric');
assert.sameValue(longNumeric.format(d0500), '5 at night', '05:00, long-numeric');
assert.sameValue(longNumeric.format(d0000), '12 in the morning', '00:00, long-numeric');
assert.sameValue(longNumeric.format(d0100), '1 in the morning', '01:00, long-numeric');
assert.sameValue(longNumeric.format(d0200), '2 in the morning', '02:00, long-numeric');
assert.sameValue(longNumeric.format(d0300), '3 in the morning', '03:00, long-numeric');
assert.sameValue(longNumeric.format(d0400), '4 in the morning', '04:00, long-numeric');
assert.sameValue(longNumeric.format(d0500), '5 in the morning', '05:00, long-numeric');
assert.sameValue(longNumeric.format(d0600), '6 in the morning', '06:00, long-numeric');
assert.sameValue(longNumeric.format(d0700), '7 in the morning', '07:00, long-numeric');
assert.sameValue(longNumeric.format(d0800), '8 in the morning', '08:00, long-numeric');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ const narrow = new Intl.DateTimeFormat('en', {
dayPeriod: 'narrow'
});

assert.sameValue(narrow.format(d0000), 'at night', '00:00, narrow format');
assert.sameValue(narrow.format(d0100), 'at night', '01:00, narrow format');
assert.sameValue(narrow.format(d0200), 'at night', '02:00, narrow format');
assert.sameValue(narrow.format(d0300), 'at night', '03:00, narrow format');
assert.sameValue(narrow.format(d0400), 'at night', '04:00, narrow format');
assert.sameValue(narrow.format(d0500), 'at night', '05:00, narrow format');
assert.sameValue(narrow.format(d0000), 'in the morning', '00:00, narrow format');
assert.sameValue(narrow.format(d0100), 'in the morning', '01:00, narrow format');
assert.sameValue(narrow.format(d0200), 'in the morning', '02:00, narrow format');
assert.sameValue(narrow.format(d0300), 'in the morning', '03:00, narrow format');
assert.sameValue(narrow.format(d0400), 'in the morning', '04:00, narrow format');
assert.sameValue(narrow.format(d0500), 'in the morning', '05:00, narrow format');
assert.sameValue(narrow.format(d0600), 'in the morning', '06:00, narrow format');
assert.sameValue(narrow.format(d0700), 'in the morning', '07:00, narrow format');
assert.sameValue(narrow.format(d0800), 'in the morning', '08:00, narrow format');
Expand All @@ -67,12 +67,12 @@ const narrowNumeric = new Intl.DateTimeFormat('en', {
hour: 'numeric'
});

assert.sameValue(narrowNumeric.format(d0000), '12 at night', '00:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0100), '1 at night', '01:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0200), '2 at night', '02:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0300), '3 at night', '03:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0400), '4 at night', '04:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0500), '5 at night', '05:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0000), '12 in the morning', '00:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0100), '1 in the morning', '01:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0200), '2 in the morning', '02:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0300), '3 in the morning', '03:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0400), '4 in the morning', '04:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0500), '5 in the morning', '05:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0600), '6 in the morning', '06:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0700), '7 in the morning', '07:00, narrow-numeric');
assert.sameValue(narrowNumeric.format(d0800), '8 in the morning', '08:00, narrow-numeric');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ const short = new Intl.DateTimeFormat('en', {
dayPeriod: 'short'
});

assert.sameValue(short.format(d0000), 'at night', '00:00, short format');
assert.sameValue(short.format(d0100), 'at night', '01:00, short format');
assert.sameValue(short.format(d0200), 'at night', '02:00, short format');
assert.sameValue(short.format(d0300), 'at night', '03:00, short format');
assert.sameValue(short.format(d0400), 'at night', '04:00, short format');
assert.sameValue(short.format(d0500), 'at night', '05:00, short format');
assert.sameValue(short.format(d0000), 'in the morning', '00:00, short format');
assert.sameValue(short.format(d0100), 'in the morning', '01:00, short format');
assert.sameValue(short.format(d0200), 'in the morning', '02:00, short format');
assert.sameValue(short.format(d0300), 'in the morning', '03:00, short format');
assert.sameValue(short.format(d0400), 'in the morning', '04:00, short format');
assert.sameValue(short.format(d0500), 'in the morning', '05:00, short format');
assert.sameValue(short.format(d0600), 'in the morning', '06:00, short format');
assert.sameValue(short.format(d0700), 'in the morning', '07:00, short format');
assert.sameValue(short.format(d0800), 'in the morning', '08:00, short format');
Expand All @@ -67,12 +67,12 @@ const shortNumeric = new Intl.DateTimeFormat('en', {
hour: 'numeric'
});

assert.sameValue(shortNumeric.format(d0000), '12 at night', '00:00, short-numeric');
assert.sameValue(shortNumeric.format(d0100), '1 at night', '01:00, short-numeric');
assert.sameValue(shortNumeric.format(d0200), '2 at night', '02:00, short-numeric');
assert.sameValue(shortNumeric.format(d0300), '3 at night', '03:00, short-numeric');
assert.sameValue(shortNumeric.format(d0400), '4 at night', '04:00, short-numeric');
assert.sameValue(shortNumeric.format(d0500), '5 at night', '05:00, short-numeric');
assert.sameValue(shortNumeric.format(d0000), '12 in the morning', '00:00, short-numeric');
assert.sameValue(shortNumeric.format(d0100), '1 in the morning', '01:00, short-numeric');
assert.sameValue(shortNumeric.format(d0200), '2 in the morning', '02:00, short-numeric');
assert.sameValue(shortNumeric.format(d0300), '3 in the morning', '03:00, short-numeric');
assert.sameValue(shortNumeric.format(d0400), '4 in the morning', '04:00, short-numeric');
assert.sameValue(shortNumeric.format(d0500), '5 in the morning', '05:00, short-numeric');
assert.sameValue(shortNumeric.format(d0600), '6 in the morning', '06:00, short-numeric');
assert.sameValue(shortNumeric.format(d0700), '7 in the morning', '07:00, short-numeric');
assert.sameValue(shortNumeric.format(d0800), '8 in the morning', '08:00, short-numeric');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ function assertParts(parts, expected, message) {
assert.sameValue(parts[0].type, 'dayPeriod', `part type is dayPeriod. ${message}`);
}

assertParts(long.formatToParts(d0000), 'at night', '00:00, long format');
assertParts(long.formatToParts(d0100), 'at night', '01:00, long format');
assertParts(long.formatToParts(d0200), 'at night', '02:00, long format');
assertParts(long.formatToParts(d0300), 'at night', '03:00, long format');
assertParts(long.formatToParts(d0400), 'at night', '04:00, long format');
assertParts(long.formatToParts(d0500), 'at night', '05:00, long format');
assertParts(long.formatToParts(d0000), 'in the morning', '00:00, long format');
assertParts(long.formatToParts(d0100), 'in the morning', '01:00, long format');
assertParts(long.formatToParts(d0200), 'in the morning', '02:00, long format');
assertParts(long.formatToParts(d0300), 'in the morning', '03:00, long format');
assertParts(long.formatToParts(d0400), 'in the morning', '04:00, long format');
assertParts(long.formatToParts(d0500), 'in the morning', '05:00, long format');
assertParts(long.formatToParts(d0600), 'in the morning', '06:00, long format');
assertParts(long.formatToParts(d0700), 'in the morning', '07:00, long format');
assertParts(long.formatToParts(d0800), 'in the morning', '08:00, long format');
Expand Down Expand Up @@ -80,12 +80,12 @@ function assertPartsNumeric(parts, hour, expected, message) {
assert.sameValue(parts[2].type, 'dayPeriod', `expected part type. ${message}`);
}

assertPartsNumeric(longNumeric.formatToParts(d0000), '12', 'at night', '00:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0100), '1', 'at night', '01:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0200), '2', 'at night', '02:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0300), '3', 'at night', '03:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0400), '4', 'at night', '04:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0500), '5', 'at night', '05:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0000), '12', 'in the morning', '00:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0100), '1', 'in the morning', '01:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0200), '2', 'in the morning', '02:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0300), '3', 'in the morning', '03:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0400), '4', 'in the morning', '04:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0500), '5', 'in the morning', '05:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0600), '6', 'in the morning', '06:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0700), '7', 'in the morning', '07:00, long-numeric');
assertPartsNumeric(longNumeric.formatToParts(d0800), '8', 'in the morning', '08:00, long-numeric');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ function assertParts(parts, expected, message) {
assert.sameValue(parts[0].type, 'dayPeriod', `part type is dayPeriod. ${message}`);
}

assertParts(narrow.formatToParts(d0000), 'at night', '00:00, narrow format');
assertParts(narrow.formatToParts(d0100), 'at night', '01:00, narrow format');
assertParts(narrow.formatToParts(d0200), 'at night', '02:00, narrow format');
assertParts(narrow.formatToParts(d0300), 'at night', '03:00, narrow format');
assertParts(narrow.formatToParts(d0400), 'at night', '04:00, narrow format');
assertParts(narrow.formatToParts(d0500), 'at night', '05:00, narrow format');
assertParts(narrow.formatToParts(d0000), 'in the morning', '00:00, narrow format');
assertParts(narrow.formatToParts(d0100), 'in the morning', '01:00, narrow format');
assertParts(narrow.formatToParts(d0200), 'in the morning', '02:00, narrow format');
assertParts(narrow.formatToParts(d0300), 'in the morning', '03:00, narrow format');
assertParts(narrow.formatToParts(d0400), 'in the morning', '04:00, narrow format');
assertParts(narrow.formatToParts(d0500), 'in the morning', '05:00, narrow format');
assertParts(narrow.formatToParts(d0600), 'in the morning', '06:00, narrow format');
assertParts(narrow.formatToParts(d0700), 'in the morning', '07:00, narrow format');
assertParts(narrow.formatToParts(d0800), 'in the morning', '08:00, narrow format');
Expand Down Expand Up @@ -80,12 +80,12 @@ function assertPartsNumeric(parts, hour, expected, message) {
assert.sameValue(parts[2].type, 'dayPeriod', `expected part type. ${message}`);
}

assertPartsNumeric(narrowNumeric.formatToParts(d0000), '12', 'at night', '00:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0100), '1', 'at night', '01:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0200), '2', 'at night', '02:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0300), '3', 'at night', '03:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0400), '4', 'at night', '04:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0500), '5', 'at night', '05:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0000), '12', 'in the morning', '00:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0100), '1', 'in the morning', '01:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0200), '2', 'in the morning', '02:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0300), '3', 'in the morning', '03:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0400), '4', 'in the morning', '04:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0500), '5', 'in the morning', '05:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0600), '6', 'in the morning', '06:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0700), '7', 'in the morning', '07:00, narrow-numeric');
assertPartsNumeric(narrowNumeric.formatToParts(d0800), '8', 'in the morning', '08:00, narrow-numeric');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ function assertParts(parts, expected, message) {
assert.sameValue(parts[0].type, 'dayPeriod', `part type is dayPeriod. ${message}`);
}

assertParts(short.formatToParts(d0000), 'at night', '00:00, short format');
assertParts(short.formatToParts(d0100), 'at night', '01:00, short format');
assertParts(short.formatToParts(d0200), 'at night', '02:00, short format');
assertParts(short.formatToParts(d0300), 'at night', '03:00, short format');
assertParts(short.formatToParts(d0400), 'at night', '04:00, short format');
assertParts(short.formatToParts(d0500), 'at night', '05:00, short format');
assertParts(short.formatToParts(d0000), 'in the morning', '00:00, short format');
assertParts(short.formatToParts(d0100), 'in the morning', '01:00, short format');
assertParts(short.formatToParts(d0200), 'in the morning', '02:00, short format');
assertParts(short.formatToParts(d0300), 'in the morning', '03:00, short format');
assertParts(short.formatToParts(d0400), 'in the morning', '04:00, short format');
assertParts(short.formatToParts(d0500), 'in the morning', '05:00, short format');
assertParts(short.formatToParts(d0600), 'in the morning', '06:00, short format');
assertParts(short.formatToParts(d0700), 'in the morning', '07:00, short format');
assertParts(short.formatToParts(d0800), 'in the morning', '08:00, short format');
Expand Down Expand Up @@ -80,12 +80,12 @@ function assertPartsNumeric(parts, hour, expected, message) {
assert.sameValue(parts[2].type, 'dayPeriod', `expected part type. ${message}`);
}

assertPartsNumeric(shortNumeric.formatToParts(d0000), '12', 'at night', '00:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0100), '1', 'at night', '01:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0200), '2', 'at night', '02:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0300), '3', 'at night', '03:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0400), '4', 'at night', '04:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0500), '5', 'at night', '05:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0000), '12', 'in the morning', '00:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0100), '1', 'in the morning', '01:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0200), '2', 'in the morning', '02:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0300), '3', 'in the morning', '03:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0400), '4', 'in the morning', '04:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0500), '5', 'in the morning', '05:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0600), '6', 'in the morning', '06:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0700), '7', 'in the morning', '07:00, short-numeric');
assertPartsNumeric(shortNumeric.formatToParts(d0800), '8', 'in the morning', '08:00, short-numeric');
Expand Down