Day of the month inconsistency with truncated time points
oliver-sanders opened this issue · 4 comments
oliver-sanders commented
When adding a truncated TimePoint
to a regular TimePoint
there can be inconsistencies with the day of the month.
e.g: 2000-01-01T00:00:00Z + 03-30T00:00:00Z = 2000-03-02T00:00:00Z
Reported in cylc/cylc-flow#2382
kinow commented
NOTE: See closed/archived (not-merged) PR #101 for some related comments and cases for tests.
MetRonnie commented
Just to check, the correct behaviour should be:
2000-01-01T00Z + 03-30T00Z = 2000-03-30T00Z
?
kinow commented
Just to check, the correct behaviour should be:
2000-01-01T00Z + 03-30T00Z = 2000-03-30T00Z
?
That was my understanding @MetRonnie 👍
MetRonnie commented
See also this example from cylc/cylc-flow#4805 (comment)
>>> now = TimePointParser().parse("2010-08-08T15:40Z") >>> point = TimePointParser(allow_truncated=True).parse("-10") >>> now + point <metomi.isodatetime.data.TimePoint: 2010-08-08T15:40:00Z> >>> now == now + point TrueI think
now + point
ought to equal2110-08-08T15:40:00Z
.