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

fix: Return normalized years-months-duration #971

Merged
merged 3 commits into from
Jan 21, 2025
Merged

Conversation

saig0
Copy link
Member

@saig0 saig0 commented Jan 17, 2025

Description

  • Add test cases to verify that a duration returns a normalized value
  • Fix the string format of a years-months-duration to return a normalized string format.

Related issues

related to #953

saig0 added 2 commits January 17, 2025 14:55
Add test cases to verify that a duration returns a normalized value.
A years-months-duration should return a normalized string format. Period.getYear returns the year-component but works only if the period is normalized.
Copy link
Member

@koevskinikola koevskinikola left a comment

Choose a reason for hiding this comment

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

LGTM @saig0 👍

I just have a question if we need to expand the test coverage with more test cases.

Add another test case to verify that a years-months-duration returns a normalized value.
@saig0 saig0 enabled auto-merge January 21, 2025 11:43
@saig0 saig0 added this pull request to the merge queue Jan 21, 2025
Merged via the queue into main with commit 4cee41e Jan 21, 2025
5 checks passed
@saig0 saig0 deleted the 953-normalize-duration branch January 21, 2025 11:47
@saig0
Copy link
Member Author

saig0 commented Jan 21, 2025

Successfully created backport PR for 1.17:

@saig0
Copy link
Member Author

saig0 commented Jan 21, 2025

Successfully created backport PR for 1.18:

@saig0
Copy link
Member Author

saig0 commented Jan 21, 2025

Successfully created backport PR for 1.19:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants