Closed zbraniecki closed 4 years ago
I'm confused what you're asking for. The possibility of including "{0}"
in the pattern is documented in https://tc39.es/proposal-intl-relative-time/#sec-Intl.RelativeTimeFormat-internal-slots .
@longlho , were you planning on following up here?
Does this need to block landing https://github.com/tc39/ecma402/pull/391 , or could we consider it as a follow-on editorial change?
The spec states The value corresponding to those properties is a pattern which may contain "{0}" to be replaced by a formatted number.
- what happens if the pattern does not contain {0}
?
I'll have to do some digging to see if there can be multiple {0}
in a pattern. More than 1 would be an issue, 0 would be fine IMO.
@zbraniecki That's expected, e.g., -1 days becoming "yesterday".
Ah! Of course! Thank you both!
Am I correct that
"0"
here comes from the requirement for the pattern to have only one placeable names0
? If that's true it may be worth documenting that requirement as well.Originally posted by @zbraniecki in https://github.com/tc39/proposal-intl-relative-time/pull/114