Skip to content

Commit

Permalink
Merge pull request #29576 from situchan/revert-29113-fix/27927
Browse files Browse the repository at this point in the history
[No QA] Revert "Add `DateTimeFormat` polyfill"
  • Loading branch information
pecanoro authored Oct 14, 2023
2 parents 3e5f300 + f1c8282 commit c5aa2aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 56 deletions.
3 changes: 1 addition & 2 deletions src/libs/IntlPolyfill/index.native.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import polyfillNumberFormat from './polyfillNumberFormat';
import polyfillListFormat from './polyfillListFormat';
import IntlPolyfill from './types';
import polyfillDateTimeFormat from './polyfillDateTimeFormat';

/**
* Polyfill the Intl API, always performed for native devices.
Expand All @@ -11,8 +10,8 @@ const intlPolyfill: IntlPolyfill = () => {
require('@formatjs/intl-getcanonicallocales/polyfill');
require('@formatjs/intl-locale/polyfill');
require('@formatjs/intl-pluralrules/polyfill');
require('@formatjs/intl-datetimeformat');
polyfillNumberFormat();
polyfillDateTimeFormat();
polyfillListFormat();
};

Expand Down
4 changes: 2 additions & 2 deletions src/libs/IntlPolyfill/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import polyfillNumberFormat from './polyfillNumberFormat';
import IntlPolyfill from './types';
import polyfillDateTimeFormat from './polyfillDateTimeFormat';

/**
* Polyfill the Intl API if the ICU version is old.
* This ensures that the currency data is consistent across platforms and browsers.
*/
const intlPolyfill: IntlPolyfill = () => {
// Just need to polyfill Intl.NumberFormat for web based platforms
polyfillNumberFormat();
polyfillDateTimeFormat();
require('@formatjs/intl-datetimeformat');
};
export default intlPolyfill;
52 changes: 0 additions & 52 deletions src/libs/IntlPolyfill/polyfillDateTimeFormat.ts

This file was deleted.

0 comments on commit c5aa2aa

Please sign in to comment.