Skip to content

Improve handling of 0-valued IsoDuration. #2324

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

Closed
michael-simons opened this issue Jul 13, 2021 · 0 comments
Closed

Improve handling of 0-valued IsoDuration. #2324

michael-simons opened this issue Jul 13, 2021 · 0 comments
Assignees
Labels
type: enhancement A general enhancement

Comments

@michael-simons
Copy link
Collaborator

The TemporalAmountAdapter cannot decide with a value of 0 whether an IsoDuration is supposed to be a Period or Duration and falls back to a TemporalAmount.
This does of course makes no sense when assigning it to a Duration. The user would have to model things as TemporalAmount which is far from ideal.

cc @svenjanko

@michael-simons michael-simons added the type: enhancement A general enhancement label Jul 13, 2021
@michael-simons michael-simons added this to the 6.0.11 (2020.0.11) milestone Jul 13, 2021
@michael-simons michael-simons self-assigned this Jul 13, 2021
michael-simons added a commit that referenced this issue Jul 13, 2021
Introduce a dedicated converter in parallel to the already existing
adapter, that is able to augment the returned type in case a zero based
`IsoDuration` has been received with the actual target type.

Closes #2324.
michael-simons added a commit that referenced this issue Jul 13, 2021
Introduce a dedicated converter in parallel to the already existing
adapter, that is able to augment the returned type in case a zero based
`IsoDuration` has been received with the actual target type.

Closes #2324.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant