Skip to content

Conversation

@baryluk
Copy link
Contributor

@baryluk baryluk commented Jul 16, 2021

>>> import pendulum
>>> dt = pendulum.datetime(2013, 3, 31, 1, 59, 59, 999999, tz='Europe/Paris')
>>> print(dt)
2013-03-31T01:59:59.999999+01:00
>>> dt = dt.add(microseconds=1)
>>> print(dt)
2013-03-31T03:00:00+02:00
>>> dt.subtract(microseconds=1)
DateTime(2013, 3, 31, 1, 59, 59, 999999, tzinfo=Timezone('Europe/Paris'))
>>> print(dt.subtract(microseconds=1))
2013-03-31T01:59:59.999999+01:00
>>> 

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

```python3
>>> import pendulum
>>> dt = pendulum.datetime(2013, 3, 31, 1, 59, 59, 999999, tz='Europe/Paris')
>>> print(dt)
2013-03-31T01:59:59.999999+01:00
>>> dt = dt.add(microseconds=1)
>>> print(dt)
2013-03-31T03:00:00+02:00
>>> dt.subtract(microseconds=1)
DateTime(2013, 3, 31, 1, 59, 59, 999999, tzinfo=Timezone('Europe/Paris'))
>>> print(dt.subtract(microseconds=1))
2013-03-31T01:59:59.999999+01:00
>>> 
```
@sdispater sdispater merged commit f772b38 into python-pendulum:master Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants