Closed FrankYFTang closed 2 years ago
@sffc @anba @ryzokuken @romulocintra @gibson042 @rkirsling
Also, I do not understand why we need those steps in sub step 2-7 under 3-k-v of PartitionDurationFormatPattern to deal with all the pattern, plural and string concat together, instead of just construct the nf under step iv and step v separately and make the "Construct (%NumberFormat%" under step v take the nfOpts with also
style: "unit",
unit: unit,
unitDisplay: style
instead?
Conclusion: This issue seems to be obsolete.
cc @ryzokuken should this be closed ?
In the current spec PartitionDurationFormatPattern https://tc39.es/proposal-intl-duration-format/#sec-partitiondurationformatpattern step 3-i-iv may set value to be an non integer value and nfOpts with minimumFractionDigits/maximumFractionDigits set to [[FractionalDigits]] which could be in range 0 to 9
But then in step 3-k-v-2 and 3
notice the %PluralRules% is construct without any option bags This will result prv value not exactly as what got generated by
for example, if the locale is "en", and we have the following case
The current spec text does not pass in any option bag to %PluralRules% constructor so step 8 of InitializePluralRules will call with
and always set to minimumFractionDigits: 0 , maximumFractionDigits: 3
but this will cause prv not matching num.
The right thing for the above code is to produce
but the current algorithm, assuming minimumFractionDigits: 0 , maximumFractionDigits: 3 will produce