Skip to content
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

Day of the month inconsistency with truncated time points #80

Open
oliver-sanders opened this issue Aug 17, 2017 · 4 comments · May be fixed by #234
Open

Day of the month inconsistency with truncated time points #80

oliver-sanders opened this issue Aug 17, 2017 · 4 comments · May be fixed by #234
Labels
Milestone

Comments

@oliver-sanders
Copy link
Member

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

@matthewrmshin matthewrmshin added this to the soon milestone Aug 17, 2017
@oliver-sanders oliver-sanders self-assigned this Aug 17, 2017
@matthewrmshin matthewrmshin modified the milestones: next-release, soon Aug 17, 2017
@dvalters dvalters self-assigned this Sep 7, 2017
@dvalters dvalters removed their assignment Oct 18, 2017
@matthewrmshin matthewrmshin modified the milestones: next-release, soon Feb 6, 2018
@oliver-sanders oliver-sanders removed their assignment Jul 27, 2018
kinow added a commit to kinow/isodatetime that referenced this issue Oct 4, 2018
kinow added a commit to kinow/isodatetime that referenced this issue Oct 9, 2018
kinow added a commit to kinow/isodatetime that referenced this issue Oct 9, 2018
kinow added a commit to kinow/isodatetime that referenced this issue Oct 10, 2018
kinow added a commit to kinow/isodatetime that referenced this issue Oct 30, 2018
kinow added a commit to kinow/isodatetime that referenced this issue Oct 30, 2018
@matthewrmshin matthewrmshin modified the milestone: soon Jan 23, 2019
@kinow
Copy link
Member

kinow commented Jun 20, 2019

NOTE: See closed/archived (not-merged) PR #101 for some related comments and cases for tests.

@MetRonnie
Copy link
Contributor

Just to check, the correct behaviour should be:

2000-01-01T00Z + 03-30T00Z = 2000-03-30T00Z?

@kinow
Copy link
Member

kinow commented Jun 16, 2020

Just to check, the correct behaviour should be:

2000-01-01T00Z + 03-30T00Z = 2000-03-30T00Z?

That was my understanding @MetRonnie 👍

@MetRonnie
Copy link
Contributor

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
True

I think now + point ought to equal 2110-08-08T15:40:00Z.

@MetRonnie MetRonnie removed their assignment Nov 11, 2022
@MetRonnie MetRonnie linked a pull request Jul 25, 2023 that will close this issue
2 tasks
@MetRonnie MetRonnie modified the milestones: 3.1.0, 3.2.0 Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants