Skip to content

Conversation

@jmargeta
Copy link
Contributor

@jmargeta jmargeta commented May 5, 2020

This updates the docs to reflect that microseconds as units in range work just fine.

import pendulum

start = pendulum.datetime(2000, 1, 1, microsecond=1, tz='Europe/Bratislava')  
end = pendulum.datetime(2000, 1, 1, microsecond=42, tz='Europe/Bratislava') 

period = pendulum.period(start, end) 
for dt in period.range('microseconds', 4):
    print(dt) 

Output

2000-01-01T00:00:00.000001+01:00
2000-01-01T00:00:00.000005+01:00
2000-01-01T00:00:00.000009+01:00
2000-01-01T00:00:00.000013+01:00
2000-01-01T00:00:00.000017+01:00
2000-01-01T00:00:00.000021+01:00
2000-01-01T00:00:00.000025+01:00
2000-01-01T00:00:00.000029+01:00
2000-01-01T00:00:00.000033+01:00
2000-01-01T00:00:00.000037+01:00
2000-01-01T00:00:00.000041+01:00

This updates the docs to reflect that microseconds as units in range work just fine.
@Secrus Secrus merged commit 262c1e0 into python-pendulum:master Aug 11, 2022
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