Skip to content

Conversation

@jswhit
Copy link
Collaborator

@jswhit jswhit commented Nov 5, 2021

add a DeprecationWarning if calendar='gregorian' used, replace DatetimeGregorian with DatetimeStandard (but keep DatetimeGregorian for backwards compatibility)

@jswhit
Copy link
Collaborator Author

jswhit commented Nov 5, 2021

We could add a CFversion attribute to cftime.datetime and only raise the warnings if CFversion >= 1.9. The question will then become what should the default value be?

@jswhit
Copy link
Collaborator Author

jswhit commented Nov 7, 2021

DeprecationWarning has been removed, and cftime.datetime.__add__ and __sub__ still return DatetimeGregorian objects so as not to break xarray. The only thing this PR really does is create a DatetimeStandard class and switch calendar='gregorian' to calendar='standard' internally everywhere.

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.

2 participants