Day of the month inconsistency with truncated time points
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 https://github.com/cylc/cylc/issues/2382
NOTE: See closed/archived (not-merged) PR #101 for some related comments and cases for tests.
Just to check, the correct behaviour should be:
2000-01-01T00Z + 03-30T00Z = 2000-03-30T00Z?
Just to check, the correct behaviour should be:
2000-01-01T00Z + 03-30T00Z = 2000-03-30T00Z?
That was my understanding @MetRonnie :+1:
See also this example from https://github.com/cylc/cylc-flow/issues/4805#issuecomment-1103928604
>>> 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 + pointought to equal2110-08-08T15:40:00Z.