Comments (6)
/cc @NorbertLindenberg @ericf @rwaldron @rxaviers @zbraniecki @srl295, can you guys look at this problem? I might be missing something, but it seems to solve all the issues with the polyfill. This issue was brought to me via andyearnshaw/Intl.js#145 (comment)
from ecma402.
Here is the diff in the polyfill:
@@ -1935,7 +1935,9 @@ function/* 12.1.1.1 */InitializeDateTimeFormat (dateTimeFormat, locales, options
p = bestFormat[prop];
// ii. Set the [[<prop>]] internal property of dateTimeFormat to p.
- internal['[['+prop+']]'] = p;
+ // Diverging from spec because of bug #58
+ // https://github.com/tc39/ecma402/issues/58
+ internal['[['+prop+']]'] = opt['[['+prop+']]'] || p;
}
from ecma402.
I'm ccing @JCEmmons, who has implemented this for ibm-js/ecma402 if I'm not wrong, and could have input.
from ecma402.
@caridy going to have to come back to this…
from ecma402.
For what it's worth, V8 follows the ICU algorithm, rather than the spec, here. It seems like Firefox does as well.
from ecma402.
Further investigation reveal that BasicFormatMatcher
doesn't have enough information to enforce the extra rule described here, which is fine, since this is the bare minimum required for this implemention, while BestFitFormatMatcher()
can certainly take that into consideration. Closing.
from ecma402.
Related Issues (20)
- Cyclic year doesn't show up in resolvedOptions HOT 1
- Ok HOT 1
- Numbering system option value not correctly passed to internal Intl.NumberFormat instances
- Feedback on ICU's new HOT 1
- Feedback on ICU's new "get IANA ID" API HOT 3
- Should ECMA-402 spec text for time zone canonicalization refer to CLDR or to IANA as authoritative? HOT 8
- Canonicalization for Calendar identifiers? HOT 2
- Consider making ResolveLocale return the normalized requested locale instead of the available locale HOT 6
- Default of ignorePunctuation need to be locale dependent HOT 3
- Support cash rounding HOT 3
- Displaying wrong date format for sr-Latn-me locale HOT 2
- Intl.NumberFormat with style: 'decimal' if the number has four digits, does not add the point on locale spanish HOT 1
- Should intrinsics be scoped? HOT 3
- Need support for nigerian currency. HOT 3
- Add option to use variant era names HOT 1
- Intl API for parsing locale aware strings HOT 2
- Inconsistency in definition of "calendar types" HOT 1
- Decimal integration HOT 1
- How to use ecma402 Intl.GetCanonicalLocales in Android HOT 1
- Intl.NumberFormat() - narrowSymbol issue in en-CA culture, USD currency HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecma402.