Description
Describe the bug
I have a user who's on an older version of Safari, and they're getting an error about Intl.ListFormat. Looking through the luxon source, it looks like it's coming from toHuman
. Unfortunately, Intl.ListFormat
isn't supported by older versions of safari. Here's the error message (manually typed from a screenshot):
TypeError: undefined is not a constructor (evaluating "new Intl.ListFormat(e, t)")
It looks like this was added to luxon fairly recently, here's the place in the source:
Line 14 in c96b813
To Reproduce
Please share a minimal code example that triggers the problem:
I haven't been able to get a stack trace from our user, but here's where I think it's coming from:
dur.shiftTo('days').toHuman({
unitDisplay: 'short',
maximumFractionDigits: 1,
});
Desktop (please complete the following information):
- OS: [OSX]
- Browser [Safari, unknown version, sorry]
- Luxon version [2.3.0]
- Your timezone [America/New_York]
Additional context
CanIUse: https://caniuse.com/?search=intl.listFormat
This is also referenced here by this feature discussion: #688 (comment)