Skip to content

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

@amannn

Description

@amannn

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions