Helper library for manipulation of formatted date/datetime values.
Project description
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dateint-0.2.0.tar.gz.
File metadata
- Download URL: dateint-0.2.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
853cab5770832cba6013601a7ca309432098444b678020e7cc4c17cf22d33fb3
|
|
| MD5 |
def80bf056188104cf6fd7ad509fa6a3
|
|
| BLAKE2b-256 |
01b46c6bed242c0177aabf4e117fb1d95f6017fd225c6fcbddc468724d7e15cb
|
File details
Details for the file dateint-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dateint-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
056235469a4b6890741380e8e2f62a77a8f063b2ed465f521a35ee74daf50406
|
|
| MD5 |
2dc0c30a5618794bb53101e7e6af896f
|
|
| BLAKE2b-256 |
d4f4468eca87cb9fc18cc5cac20adf7b9e18a2b1eaca9a640d22acac3e0d9bb2
|