Skip to content

month duration for non-gregorian calendars returns UnInt when it is not uncertain #140

@rlskoeser

Description

@rlskoeser

Likely introduced in v0.5 when improving duration logic for ambiguous dates.

For non-ambiguous non-gregorian dates, we can either use the delta earliest/latest Gregorian dates or the month duration from the calendar converter. (These should agree and may be a helpful check to confirm logic).

To reproduce:

All of the dates and calendars parsed below should return integers; none of them should return UnInt values. This is a result of the duration logic using both Gregorian months in range for the converted date.

Tammuz 1288	Seleucid	1288-04	month	0977-06-26	0977-07-24	UnInt(lower=29, upper=30)
1337	Seleucid	1337	year	1025-09-03	1026-09-20	355
Tevet 1548	Seleucid	1548-10	month	1236-12-07	1237-01-04	29
Elul 1428	Seleucid	1428-06	month	1117-08-08	1117-09-05	UnInt(lower=29, upper=30)
First decade of Ḥeshvan 1442	Seleucid	1442-08	month	1130-10-13	1130-11-10	UnInt(lower=29, upper=30)
Shawwāl 425	Hijrī	0425-10	month	1034-08-25	1034-09-22	UnInt(lower=29, upper=30)
Ḥeshvan 1453	Seleucid	1453-08	month	1141-10-11	1141-11-08	UnInt(lower=29, upper=30)
Shevat (4)791	Anno Mundi	4791-11	month	1031-01-03	1031-02-01	UnInt(lower=29, upper=30)
Heshvan 4800	Anno Mundi	4800-08	month	1039-10-28	1039-11-26	UnInt(lower=29, upper=30)

Metadata

Metadata

Assignees

No one assigned

    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