Metadata-Version: 2.1
Name: period-iterator
Version: 1.3.0
Summary: Period Iterator
Home-page: https://github.com/chonla/period-iterator
Author: Chonlasith Jucksriporn
Author-email: chonlasith@gmail.com
License: MIT
Keywords: period,iterator
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7, <4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-dateutil
Requires-Dist: pytz

# Period Iterator

Period Iterator is a library easing you to iterate through given period.

## Usage

```python
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
    print(period.cursor.date()) # Date
    if not period.next():
        break

# Expected Output
#
# 2020-02-01T00:00:00+07:00
# 2020-02-01T23:59:59+07:00
# 2020-02-01
# 2020-02-02T00:00:00+07:00
# 2020-02-02T23:59:59+07:00
# 2020-02-02
# 2020-02-03T00:00:00+07:00
# 2020-02-03T23:59:59+07:00
# 2020-02-03
```

## License

[MIT](https://github.com/chonla/period-iterator/blob/master/LICENSE)
