Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same defaults for date-, time-, number- and list formatting for values in messages and when used through format.* #1347

Open
amannn opened this issue Sep 18, 2024 · 0 comments
Labels
area: ergonomics enhancement New feature or request

Comments

@amannn
Copy link
Owner

amannn commented Sep 18, 2024

Is your feature request related to a problem? Please describe.

By default, no global formats are available via format.* calls. However, for consumption in messages, a few defaults are available through intl-messageformat (source).

Describe the solution you'd like

Ideally, we'd support the same defaults across both options.

The options I can currently think of are:

  1. Importing formats from intl-messageformat for local consumption (big downside: pulls in the whole dependency, so not really an option).
  2. Re-defining the formats for both places (downside: duplication with intl-messageformat)
  3. Using no defaults in either place
  4. After feat: AOT compilation with icu-to-json (experiment) #705, we'll get rid of intl-messageformat at runtime and also gain more control over aspects like defaults, so we could consider supporting the same defaults for both APIs without duplication

I'm currently favoring (3), but this would be a breaking change.

Describe alternatives you've considered

User has to define all relevant formats in user space. These apply to either functionality.

@amannn amannn added enhancement New feature or request unconfirmed Needs triage. area: ergonomics and removed unconfirmed Needs triage. labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ergonomics enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant