pendulum
pendulum copied to clipboard
Small typo in documentation substract method
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
Issue
There is a small typo in the doc for the pendulum object's subtract method.
https://github.com/python-pendulum/pendulum/blob/master/docs/docs/addition_subtraction.md?plain=1#L67
>>> dt = dt.subtract(minutes=1)
'2012-01-28 01:01:00'
>>> dt = dt.subtract(minutes=24)
'2012-01-28 00:00:00'
The result of dt.subtract(minutes=24) is wrong, it should be 2012-01-28 00:37:00
Can I work on this?
I've opened a PR to fix this: https://github.com/python-pendulum/pendulum/pull/949
Three incorrect values were found:
add(hours=1)result showed'2012-02-25'instead of'2012-01-29'subtract(hours=1)result showed'2012-02-29'instead of'2012-01-29'(also impossible date in context)subtract(minutes=24)from01:01:00showed'00:00:00'instead of'00:37:00'