Skip to content

Misleading ZonedDateTime.toString error message #276

Open
@akselinurmio

Description

@akselinurmio

In ZonedDateTime.toString calls there is following inconsistency in error messages concerning the smallestUnit option: first, if the given unit is invalid (e.g. an empty string) the error message states that "hour" would be among accepted units. However, "hour" is not accepted value here, so if ZonedDateTime.toString is called with options object { smallestUnit: "hour" }, the error message tells me that the smallestUnit must be a time unit other than "hour".

Screenshot 2024-03-04 at 14 09 19

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