Skip to content

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
@gareththackeray gareththackeray deleted the duration-preserve-months branch February 24, 2025 08:40
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