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

Refer to DateTimeComponents field names in errors for null values #472

Merged

Conversation

dkhalanskyjb
Copy link
Collaborator

Fixes #471

@dkhalanskyjb dkhalanskyjb requested a review from ilya-g January 8, 2025 10:56
core/common/test/format/DateTimeComponentsFormatTest.kt Outdated Show resolved Hide resolved
PropertyAndItsValue(DateTimeComponents::nanosecond, 123_456_789),
PropertyAndItsValue(DateTimeComponents::offsetHours, 3),
PropertyAndItsValue(DateTimeComponents::offsetMinutesOfHour, 30),
PropertyAndItsValue(DateTimeComponents::offsetSecondsOfMinute, 15),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is offsetIsNegative false by default?
Or null in offsetIsNegative is equivalent to false when formatting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or null in offsetIsNegative is equivalent to false when formatting?

This one. We haven't explicitly designed this behavior, so we can discuss it if you think it's problematic.

@dkhalanskyjb dkhalanskyjb force-pushed the better-error-messages-on-DateTimeComponents-formatting branch from dfb061a to 553349f Compare February 10, 2025 09:01
@dkhalanskyjb dkhalanskyjb merged commit 797c7e4 into master Feb 18, 2025
1 check passed
@dkhalanskyjb dkhalanskyjb deleted the better-error-messages-on-DateTimeComponents-formatting branch February 18, 2025 05:11
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

Successfully merging this pull request may close these issues.

Obscure error message in the formatting API
2 participants