Skip to content

Polyfill: Using both dateStyle and timeStyle throws a TypeError #3061

Open
@anba

Description

new Temporal.PlainDateTime(2024, 12, 11).toLocaleString("en", {dateStyle: "full", timeStyle: "full"})

Throws:

Uncaught TypeError: can't set option hour when dateStyle is used
    getSlotLazy intl.mjs:57
    extractOverrides intl.mjs:595
    format intl.mjs:232
    Call Call.js:19
    boundFormat intl.mjs:169
    toLocaleString plaindatetime.mjs:262
    <anonymous> debugger eval code:1

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions