-
Notifications
You must be signed in to change notification settings - Fork 39
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
datetime object dayofyear and dayofwk issue #13
Comments
The dayofwk and dayofyr values only get calculated when the routine is called to convert a Julian day number to a date (i.e. num2date). The only way that cftime.DatetimeNoLeap will have the correct values is if they are passed into |
After looking into this a bit more, it seems to me that the dayofwk and dayofyr support is half-baked at best. These attributes are not provided by the python datetime object, so perhaps we should just remove them. I wonder if anyone is actually using this? |
This is fixed by pull request #66, closingnow. |
netcdftime.datetime
objects constructed directly don't have the correct day of year or day of week; they always give a value of 1 and -1 respectively. Objects returned byutime.num2date
have the correct values, except for those with Julian calendars, which still have the issue.Python version: 2.7
netdf4 version: 1.2.7
Installed via conda forge.
The text was updated successfully, but these errors were encountered: