Shane F. Carr
Shane F. Carr
Replaced by https://github.com/unicode-org/icu4x/pull/4774
Relatedly: I'm warming up to the idea that the DateTimePattern constructor should resolve the pattern parts into a `Vec` or `SmallVec`. It will make the formatting code much more straightforward,...
Discuss with: - @sffc - @Manishearth - @zbraniecki - @eggrobin Optional: - @echeran
The new API should enable the locale-specific symbols to be pre-loaded but provide a pattern at runtime. This is not dissimilar to the approach we're taking with FixedDecimalFormatter, where we...
Tentative conclusion: 1. `DateTimePatternInterpolator` does not own a pattern, but it has `Option` fields for all the datetime symbols 2. It has `&mut self` loading functions to fill in the...
Additional notes on the design: - `NeoDateTimeFormatter` owns a `DateTimePatternInterpolator` and 1 or more `runtime::Pattern`s. In the format function, it selects the correct pattern for the datetime input and returns...
- @robertbastian - `new` should move the locale, or else it should borrow the locale with a lifetime - @sffc - This is not consistent with TimeZoneFormatter but I'm fine...
Naming bikeshed for DateTimePatternInterpolator: 1. `DateTimeSymbols` 2. `DateTimeSymbol[s]Bag` 3. `DateTimeData` 4. `DateTimeDataBag` 5. `DateTimeSymbol[s]Cache` 6. `DateTimeSymbol[s]Loader` 7. `DateTimeSymbol[s]Holder` 8. `DateTimePatternFormatter` 9. `DateTimeSymbol[s]Store` 10. `DateTimeFormatInfo` 11. `DateTimePatternSymbols` - @sffc - Not...
My PR [#4204](https://github.com/unicode-org/icu4x/pull/4204) uses the name `TypedDateTimePatternInterpolator` as proposed in the OP. It doesn't do everything proposed yet so the name is still open. Some other ideas: - `DateTimeNames` -...
Also we can add helper functions on `DateTimeNames` to get specific symbols like the AM/PM symbol.