dateint
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:
- convert the original value to
dateordatetime - perform the date/datetime operation
- 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:
import dateint as di di.add(20220510, days=15) # 20220525
-
pandas:
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 for the complete and detailed documentation.
Installation
pip install dateint
Metadata
Release files for dateint 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dateint-0.2.0.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dateint-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.2 kB
Release files / dateint-0.2.0.tar.gz
| Download URL | dateint-0.2.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
853cab5770832cba6013601a7ca309432098444b678020e7cc4c17cf22d33fb3
|
|
BLAKE2b-256 checksum How to use checksums |
01b46c6bed242c0177aabf4e117fb1d95f6017fd225c6fcbddc468724d7e15cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / dateint-0.2.0-py3-none-any.whl
| Download URL | dateint-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
056235469a4b6890741380e8e2f62a77a8f063b2ed465f521a35ee74daf50406
|
|
BLAKE2b-256 checksum How to use checksums |
d4f4468eca87cb9fc18cc5cac20adf7b9e18a2b1eaca9a640d22acac3e0d9bb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|