Skip to content

[intl] Expose the ICU NumberRangeFormatter #18599

Closed

Description

@stof

Description

ICU4C has a NumberRangeFormatter API allowing to format a range between 2 numbers based on the convention of each locale.

It would be great to provide a PHP API based on it.

Activity

  1. stof commented on May 19, 2025

    @stof
    ContributorAuthor

    This was first mentioned by @Ayesh in #18346 (comment)

  2. BogdanUngureanu commented on May 19, 2025

    @BogdanUngureanu
    Contributor

    According to the docs, that class (and its C equivalent) are stable since ICU 63 68. Unfortunately, PHP should support ICU 57.1 and up. The version was bumped recently I believe.

    I implemented IntlListFormatter because the base functionality (without OR and UNITS) was supported in 57.

  3. ndossche commented on May 19, 2025

    @ndossche
    Member

    It's still possible to support it, with conditional compilation. It's not unheard of making some classes / functions only available for recent lib versions.

  4. ndossche commented on Jun 27, 2025

    @ndossche
    Member

    @BogdanUngureanu Still interested in this? Otherwise I might give it a try.

  5. BogdanUngureanu commented on Jun 28, 2025

    @BogdanUngureanu
    Contributor

    @nielsdos yeah, I would like to work on it. I was thinking today or tomorrow

  6. BogdanUngureanu commented on Oct 18, 2025

    @BogdanUngureanu
    Contributor

    @devnexen we can close this one. :)

  7. ndossche commented on Oct 18, 2025

    @ndossche
    Member

    Implemented via #19232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions