dateint-0.1.0
توضیحات
Helper library for manipulation of formatted date/datetime values.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | dateint-0.1.0 |
| نام | dateint |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Bruno Amaral |
| ایمیل نویسنده | amaralbf@gmail.com |
| آدرس صفحه اصلی | https://github.com/amaralbf/dateint |
| آدرس اینترنتی | https://pypi.org/project/dateint/ |
| مجوز | - |
# dateint
[](https://github.com/amaralbf/dateint/actions?query=workflow%3Aci+event%3Apush+branch%3Amain)
[](https://codecov.io/github/amaralbf/dateint)

[](/LICENSE)
[](https://github.com/ambv/black/)
Helper library for manipulation of formatted date/datetime values
It's very common to store date/datetimes as **integers** or **strings** using formats
such as `YYYYmmdd` or `YYYYmm`. In python, to perform date/datetime arithmetic on those
values, one needs to:
1. convert the original value to `date` or `datetime`
2. perform the date/datetime operation
3. convert the result back to the original format
With `dateint`, we **abstract** all convertion operations so you can focus on the
**arithmetic step**:
- **single value:**
```py hl_lines="3"
import dateint as di
di.add(20220510, days=15)
# 20220525
```
- **pandas:**
```py hl_lines="6"
import dateint as di
import pandas as pd
dates = pd.Series([202201, 202202, 202203])
di.add(dates, months=2)
'''
0 202203
1 202204
2 202205
dtype: int64
'''
```
## Documentation
See the [documentation page](https://amaralbf.github.io/dateint/) for the complete and
detailed documentation.
## Installation
```sh
pip install dateint
```
نیازمندی
| مقدار | نام |
|---|---|
| - | pandas |
| - | python-dateutil |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl dateint-0.1.0:
pip install dateint-0.1.0.whl
نصب پکیج tar.gz dateint-0.1.0:
pip install dateint-0.1.0.tar.gz