Skip to content

Temporal: Exception thrown when adding maximum duration to minimum date #963

@catamorphism

Description

@catamorphism
 mx js --js.temporal=true --experimental-options
> new Temporal.PlainDate(-271821, 4, 19).add("P28571428W4D")
RangeError: Date outside of supported range
    at <js> :program(<shell>:1:1:0-57)

This should return a date that equals new Temporal.PlainDate(275760, 9, 12) instead of throwing. The result date is within range according to the spec.

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