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
is_holiday
function doesn't return correct result when pandas Timestamp
is passed.
#294
Comments
mmmm.... this is sad that padas Timestamp doesn't inherit from the stdlib types... |
@brunobord Yes, it is possible using the
|
ok, looks like it's doable. Then my question would be: why should |
I see your point. I am not advising to accept additional types. Maybe a check of type + raising an exception would be enough to avoid dealing with other formats than What do you think? |
I had the same problem. Throwing an error would be nice because if I didn't double check I would have never known. |
turns out pandas' Timeout is a datetime subclass. Interesting, we may be able to support more types, as long as they are something like "duck dates" (that quack like a date) |
* only standard library `date` and `datetime` types (or subtypes) are supported, * added a new dedicated exception, * added a paragraph in the documentation about this type support. refs #294
* only standard library `date` and `datetime` types (or subtypes) are supported, * added a new dedicated exception, * added a paragraph in the documentation about this type support. refs #294
closed by #298 + released with the version 3.2.0 |
The
is_holiday
function expects adatetime.datetime
format. However, it doesn't raise any error when a pandasTimestamp
is passed (https://pandas.pydata.org/pandas-docs/version/0.23.4/generated/pandas.Timestamp.html).Here is a code example (
workalendar
version '3.1.1'):I expect the library to raise an error when the passed input isn't of type
datetime.datetime
.What are your thoughts?
Thanks in advance. :)
The text was updated successfully, but these errors were encountered: