Skip to content

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

Closed
@rlskoeser

Description

@rlskoeser

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions