Skip to content

potential solution for roundtrip issue with microseconds (issue #187) - #188

Merged
jswhit merged 9 commits into
masterfrom
issue187
Jul 18, 2020
Merged

jswhit merged 9 commits into
masterfrom
issue187

Conversation

@jswhit

@jswhit jswhit commented Jul 17, 2020 •

Copy link
Copy Markdown
Collaborator

closes #187 and #189

Jeff Whitaker added 2 commits July 16, 2020 20:54

@spencerkclark spencerkclark left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jswhit -- I think this makes sense. It does prevent exact roundtripping with non-microsecond units in the case when dates truly are near the second boundary -- e.g. roundtripping cftime.DatetimeNoLeap(2000, 1, 1, 0, 0, 0, 999999) with units of "days since 2000-01-01" -- but this is probably rarer than the issue in #187.

Comment thread cftime/_cftime.pyx Outdated
Comment thread cftime/_cftime.pyx Outdated
Comment thread cftime/_cftime.pyx Outdated
Comment thread cftime/_cftime.pyx Outdated
@jswhit

jswhit commented Jul 17, 2020

Copy link
Copy Markdown
Collaborator Author

Fix included for calculation of leap years when year is negative (issue #188). Closes issue #188.

@spencerkclark spencerkclark left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix included for calculation of leap years when year is negative

Good catch, thanks!

Comment thread Changelog Outdated
Jeff Whitaker and others added 2 commits July 18, 2020 13:13
Co-authored-by: Spencer Clark <spencerkclark@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Back and forth conversions fail with num2date and date2num

2 participants