timezone plugin broken in IE11 (unsupported method)
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
`Intl.DateTimeFormat.formatToParts` is [not supported](https://caniuse.com/mdn-javascript_builtins_intl_datetimeformat_formattoparts) in IE11. This method is used by the timezone plugin [here](https://github.com/iamkun/dayjs/blob/9c20e77caf7b1b5eccf418175203b198d4e29535/src/plugin/timezone/index.js#L42). Using the plugin in IE11 results in a runtime error.
**Expected behavior**
IE11 support. Documentation states "Currently the following browsers are used for the ci system: Chrome on Windows XP, IE 8, 9, and 10 on Windows 7, IE 11 on Windows 10, latest Firefox on Linux, and latest Safari on OSX 10.8 and 10.11."
**Information**
- Day.js Version 1..10.4
- OS: Windows 10
- Browser IE11
- Time zone: GMT-07:00 DST (Pacific Daylight Time)
Contributor guide
Research direction
Start at src/plugin/timezone/index.js around line 42, where Intl.DateTimeFormat.formatToParts is used, and review the timezone plugin's browser-support setup. Reproduce the IE11 runtime error, then verify that the plugin works in IE11 without changing its expected timezone results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100