Skip to content

Temporal: Exception thrown when rounding Instant using roundingIncrement: 25 #964

@catamorphism

Description

@catamorphism
> inst = Temporal.Instant.from("2001-09-09T01:46:40Z")
Temporal.Instant{}
> inst.round({roundingIncrement: 25, roundingMode: "ceil", smallestUnit: "microsecond"}).toString()
RangeError: Increment out of range.

25 is a valid rounding increment for smallestUnit: microseconds (see https://tc39.es/proposal-temporal/#sec-validatetemporalroundingincrement ).

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