Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading ZonedDateTime.toString error message #276

Open
akselinurmio opened this issue Mar 4, 2024 · 0 comments
Open

Misleading ZonedDateTime.toString error message #276

akselinurmio opened this issue Mar 4, 2024 · 0 comments

Comments

@akselinurmio
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant