Period Iterator
Project description
Period Iterator
Period Iterator is a library easing you to iterate through given period.
Usage
from period_iterator.period_iterator import period_iterator
period = period_iterator('2020-02-01,2020-02-03', 'Asia/Bangkok')
while True:
print(period.cursor.begin()) # Begin of day
print(period.cursor.end()) # End of day
if not period.next():
break
# Expected Output
#
# 2020-02-01T00:00:00+07:00
# 2020-02-01T23:59:59+07:00
# 2020-02-02T00:00:00+07:00
# 2020-02-02T23:59:59+07:00
# 2020-02-03T00:00:00+07:00
# 2020-02-03T23:59:59+07:00
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
period-iterator-1.2.5.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for period_iterator-1.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78aefcea489a1b6de2f7d3cca7b83fb1f3a3fe3b32526b12f6e225b5196b2cc9 |
|
MD5 | 44ad552e4c54e5b2fda100138b3fc4f0 |
|
BLAKE2b-256 | 670887275e17e69ca21c8b81668475f713c2a6d0f1a98f930bc0ad976939aee6 |