# 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)
Raw data
{
"_id": null,
"home_page": "https://github.com/chonla/period-iterator",
"name": "period-iterator",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7, <4",
"maintainer_email": "",
"keywords": "period,iterator",
"author": "Chonlasith Jucksriporn",
"author_email": "chonlasith@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/3e/a8/0acc3bf18c4634e69364068fb4dbdd62667a82b8b434d3f02c74197d9beb/period-iterator-1.3.0.tar.gz",
"platform": null,
"description": "# Period Iterator\n\nPeriod Iterator is a library easing you to iterate through given period.\n\n## Usage\n\n```python\nfrom period_iterator.period_iterator import period_iterator\n\nperiod = period_iterator('2020-02-01,2020-02-03', 'Asia/Bangkok')\n\nwhile True:\n print(period.cursor.begin()) # Begin of day\n print(period.cursor.end()) # End of day\n print(period.cursor.date()) # Date\n if not period.next():\n break\n\n# Expected Output\n#\n# 2020-02-01T00:00:00+07:00\n# 2020-02-01T23:59:59+07:00\n# 2020-02-01\n# 2020-02-02T00:00:00+07:00\n# 2020-02-02T23:59:59+07:00\n# 2020-02-02\n# 2020-02-03T00:00:00+07:00\n# 2020-02-03T23:59:59+07:00\n# 2020-02-03\n```\n\n## License\n\n[MIT](https://github.com/chonla/period-iterator/blob/master/LICENSE)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Period Iterator",
"version": "1.3.0",
"project_urls": {
"Homepage": "https://github.com/chonla/period-iterator"
},
"split_keywords": [
"period",
"iterator"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fa3defa08ad8edd5e8fc4be3d725c5bbb4f8f9aeaabcc6896aef16b920e75c1e",
"md5": "51a7195eae95323c0e826c30a648a7f4",
"sha256": "41ef910e66c8fc9c1626febe2a37e9f96fbcf76097b462463bb13807cf80d2c3"
},
"downloads": -1,
"filename": "period_iterator-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "51a7195eae95323c0e826c30a648a7f4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7, <4",
"size": 6363,
"upload_time": "2023-05-29T05:24:07",
"upload_time_iso_8601": "2023-05-29T05:24:07.032428Z",
"url": "https://files.pythonhosted.org/packages/fa/3d/efa08ad8edd5e8fc4be3d725c5bbb4f8f9aeaabcc6896aef16b920e75c1e/period_iterator-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3ea80acc3bf18c4634e69364068fb4dbdd62667a82b8b434d3f02c74197d9beb",
"md5": "7b59493818afa320415eed632864618a",
"sha256": "ad5f92949cbfe31ea518b89a0a02e303cdd2f0419f619f323caa93b0e43cb2d1"
},
"downloads": -1,
"filename": "period-iterator-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "7b59493818afa320415eed632864618a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7, <4",
"size": 6112,
"upload_time": "2023-05-29T05:24:08",
"upload_time_iso_8601": "2023-05-29T05:24:08.573912Z",
"url": "https://files.pythonhosted.org/packages/3e/a8/0acc3bf18c4634e69364068fb4dbdd62667a82b8b434d3f02c74197d9beb/period-iterator-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-29 05:24:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "chonla",
"github_project": "period-iterator",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "period-iterator"
}