We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
millisecond
milliseconds
relativedelta
In python, I can add a timedelta specified with milliseconds to a datetime object.
timedelta
datetime
In [7]: from datetime import datetime, timedelta In [8]: dt = datetime(2018, 4, 9, 13, 37, 0) In [12]: dt + timedelta(milliseconds=42) Out[12]: datetime.datetime(2018, 4, 9, 13, 37, 0, 42000)
With relativedelta, this is not possible (for both arithmatic input or absolute replacement input)
In [13]: dt + relativedelta(millisecond=42) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-13-8e589d33a46f> in <module> ----> 1 dt + relativedelta(millisecond=42) TypeError: __init__() got an unexpected keyword argument 'millisecond' In [14]: dt + relativedelta(milliseconds=42) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-14-d64aff9f46cc> in <module> ----> 1 dt + relativedelta(milliseconds=42) TypeError: __init__() got an unexpected keyword argument 'milliseconds'
The text was updated successfully, but these errors were encountered:
pd.DateOffset
That's fair, we could add this for arithmetic input similar to how we support weeks.
weeks
Sorry, something went wrong.
Hi!
Is this issue up for grabs? I am interested in it
Absolutely, take inspiration on how "weeks" work.
Successfully merging a pull request may close this issue.
In python, I can add a
timedelta
specified withmilliseconds
to adatetime
object.With
relativedelta
, this is not possible (for both arithmatic input or absolute replacement input)The text was updated successfully, but these errors were encountered: