Skip to content

Intl gaps: RelativeTimeFormat numeric:"auto" word forms, and instanceof through an Intl subclass #6960

Description

@proggeramlug

Two pre-existing Intl divergences, both reproduced on released perry 0.5.1220 (so not from any in-flight size work) — found while probe-testing #6959.

1. RelativeTimeFormat with numeric: "auto" doesn't use word forms

new Intl.RelativeTimeFormat("en", { numeric: "auto" }).format(-1, "day")
// node:  yesterday
// perry: 1 day ago

numeric: "auto" should substitute the CLDR relative word forms (yesterday/today/tomorrow, last/this/next week…) instead of always rendering the numeric form.

2. instanceof fails through an Intl subclass

class MyNF extends Intl.NumberFormat {}
new MyNF("en-US") instanceof Intl.NumberFormat
// node: true — perry: false

The subclass instance formats correctly (new MyNF("en-US").format(99)99), so construction and the brand both work; only the instanceof brand probe misses the subclass case. Same family as #6924 (native-base subclass gaps).

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