Skip to content

Commit

Permalink
handle stupid Stupid STUPID whitespace changes in timestamps
Browse files Browse the repository at this point in the history
ICU 72 is the worst ICU ever. EVER. When is whitespace not actually
whitespace? When it's narrow no-break space whitespace. So so unamusing.

See also: nodejs/node#46123
  • Loading branch information
zburke committed Apr 26, 2023
1 parent 5696e76 commit 17f75f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion util/tests/dateUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ describe('Date Utilities', () => {
describe('get locale time format - en-US', () => {
let timeFormat;
beforeEach(async () => {
timeFormat = getLocalizedTimeFormatInfo('en-US'); // eslint-disable-line
timeFormat = getLocalizedTimeFormatInfo('en-US');

// Oh ICU 72, how do I hate thee? Let me count the ways.
// https://github.com/nodejs/node/issues/46123
timeFormat.timeFormat = timeFormat.timeFormat.replaceAll('\u202f', ' ');
});

it('returns the time format according to the passed locale', () => {
Expand Down

0 comments on commit 17f75f1

Please sign in to comment.