Skip to content

Commit 1b4929c

Browse files
pecanoroOSBotify
authored andcommitted
Merge pull request #29576 from situchan/revert-29113-fix/27927
[No QA] Revert "Add `DateTimeFormat` polyfill" (cherry picked from commit c5aa2aa)
1 parent 27ebe16 commit 1b4929c

File tree

3 files changed

+3
-56
lines changed

3 files changed

+3
-56
lines changed

src/libs/IntlPolyfill/index.native.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import polyfillNumberFormat from './polyfillNumberFormat';
22
import polyfillListFormat from './polyfillListFormat';
33
import IntlPolyfill from './types';
4-
import polyfillDateTimeFormat from './polyfillDateTimeFormat';
54

65
/**
76
* Polyfill the Intl API, always performed for native devices.
@@ -11,8 +10,8 @@ const intlPolyfill: IntlPolyfill = () => {
1110
require('@formatjs/intl-getcanonicallocales/polyfill');
1211
require('@formatjs/intl-locale/polyfill');
1312
require('@formatjs/intl-pluralrules/polyfill');
13+
require('@formatjs/intl-datetimeformat');
1414
polyfillNumberFormat();
15-
polyfillDateTimeFormat();
1615
polyfillListFormat();
1716
};
1817

src/libs/IntlPolyfill/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import polyfillNumberFormat from './polyfillNumberFormat';
22
import IntlPolyfill from './types';
3-
import polyfillDateTimeFormat from './polyfillDateTimeFormat';
43

54
/**
65
* Polyfill the Intl API if the ICU version is old.
76
* This ensures that the currency data is consistent across platforms and browsers.
87
*/
98
const intlPolyfill: IntlPolyfill = () => {
9+
// Just need to polyfill Intl.NumberFormat for web based platforms
1010
polyfillNumberFormat();
11-
polyfillDateTimeFormat();
11+
require('@formatjs/intl-datetimeformat');
1212
};
1313
export default intlPolyfill;

src/libs/IntlPolyfill/polyfillDateTimeFormat.ts

-52
This file was deleted.

0 commit comments

Comments
 (0)