Skip to content

duration for uncertain years are calculated based on earliest/latest days #130

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

Open
rlskoeser opened this issue May 9, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@rlskoeser
Copy link
Member

Undate duration logic for uncertain years hasn't been implemented properly.

At a minimum this should return something like the default or most common number of years for the given calendar, rather than calculating the number of days from the earliest possible date to the last possible date in range.

Once we have support for uncertain integers (#129), then this should be updated to return a undelta based on the min/max days for possible years in range for the current calendar.

>>> from undate import Undate
>>> Undate("19XX").duration().days
36524
>>> Undate("190X").duration().days
3652
>>> Undate("190X", calendar="Hebrew").duration().days
3661
@rlskoeser rlskoeser added the bug Something isn't working label May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant