| 05:56 | <justingrant> | Hi 402 friends, we recently had two bugs reported on the Temporal polyfill which turned out to be caused by Firefox regressions in DateTimeFormat#formatToParts output.
What's a good way to find out if these are problems caused by the latest ICU data or if the issues are limited to Firefox's implementation so the other browsers won't be affected? If the former, then what's the best way to ensure that the same bugs won't show up in Chrome and Safari? |
| 17:42 | <sffc> | The first issue is probably not going to be fixed, since Greg found its origin in CLDR data. I think what the polyfill needs is a map from English month name strings to numbers. |
| 17:43 | <sffc> | For the second bug, we should just be more lenient with our parsing of the era name |
| 17:45 | <sffc> | In general, it's very brittle to rely on formatToParts output. The spec makes very few guarantees about it. It just means that we need to update our polyfill code whenever there's a new browser release that breaks an assumption that worked on previous browser versions. Hopefully we can stop doing this once Temporal proper is implemented. |
| 17:51 | <sffc> | We should case-fold all input strings and have a dictionary from potential strings to their resolved values. This would solve both bugs |