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

Preserve months when using the Pendulum Duration type #283

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

gareththackeray
Copy link
Contributor

@gareththackeray gareththackeray commented Jan 3, 2025

When using the Duration type on a model it was losing the month information. This is important because months have variable number of days; if you want a duration of "1 month" that's what you want; not 30 days.

This fixes #242

Copy link
Collaborator

@yezz123 yezz123 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@yezz123 yezz123 merged commit 01866e6 into pydantic:main Jan 3, 2025
10 checks passed
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.

"Month" durations get converted to weeks / days
2 participants