Skip to content

DurationFormat resolvedOptions() output should always include fractionalDigits #964

Open
@gibson042

Description

@gibson042

Objects returned from resolvedOptions() sometimes omit fields, but generally only when they have no meaningful interpretation (e.g., NumberFormat {minimum,maximum}{Fraction,Significant}Digits or Collator numeric/caseFirst when those are not relevant extension keys).

But DurationFormat omits fractionalDigits whenever input options do not define a numeric value for it, which seems odd. Rather than having Object.getOwnPropertyDescriptor(new Intl.DurationFormat().resolvedOptions(), "fractionalDigits") return undefined (implicitly propagating a value that might be defined on Object.prototype), I'd like to see it return { value: undefined, writable: true, enumerable: true, configurable: true }, such that the shape of returned objects is always consistent.

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