icu4x
icu4x copied to clipboard
Support numeric overrides in DateTimeFormat
Split out of https://github.com/unicode-org/icu4x/issues/3865
https://github.com/unicode-org/icu4x/pull/4228 adds support for numeric overrides in patterns.
We need to teach DateTimeFormat to apply these.
Currently the only overrides available are d=hanidays, hanidec, hebr, M=romanlow, y=jpanyear. Out of these , the M and d ones can be hardcoded as a symbols array (though it may be better to write a short hanidays algorithm that supports numbers <100). y=jpanyear is quite straightforward: it simply uses 元 for y=1. hanidec is a very straightforward symbol based scheme (could be done using FixedDecimalFormat, but easy enough to hardcode in a compact way).
hebr is the only real challenge (it's complicated). We can punt on this for now and use Latin until we support full RBNF, and then invoke that.