-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: non-nano strftime returns wrong results #50793
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
Conversation
bd91aae
to
79900d0
Compare
@jbrockmendel I don't think there's any prospect of getting this working before 2.0.0, or is there? OK with just raising an informative message? better than giving the wrong result imo 😄 |
Definitely. It's a bit hacky, but what if we did something like
|
thanks - just tried that and got a long error ending with
|
Makes sense. Next idea would be to do something like |
maybe, but there'd be quite a lot of edge cases to take care of, and I'd be worried about rushing it |
Agreed. |
Maybe could handle the same subset of cases that array_strftime handles without recursing |
pandas/_libs/tslibs/timestamps.pyx
Outdated
try: | ||
return self.to_pydatetime().strftime(format) | ||
except ValueError as err: | ||
raise ValueError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NotImplementedError
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, that'd be better, thanks!
89a1514
to
afdf0a3
Compare
looks like |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.