Skip to content

Intl.NumberFormat.prototype.format should allow both with/without spaces around numbers #4536

Open
@Gumichocopengin8

Description

@Gumichocopengin8

For the Intl.NumberFormat test cases with ja-JP and zh-TW locales, it has been observed that spaces appear before and after the number when using long for unitDisplay.

"long": "時速 987 キロメートル",

However, these spaces are not explicitly specified in the ECMA-402 specification.

const nf = new Intl.NumberFormat("ja-JP", { style: "unit", unit: "kilometer-per-hour", unitDisplay: 'long' });
nf.format(987)

Given this observation, both of the following formats should be considered acceptable outputs for the above code:

  • 時速 987 キロメートル
  • 時速987キロメートル
    and even these too?
  • 時速 987キロメートル
  • 時速987 キロメートル

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions