Skip to main content

dateint

ci-status Coverage PYPI MIT License Code Style 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:

    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)

Source distribution for dateint 0.2.0
File Size Uploaded
dateint-0.2.0.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dateint 0.2.0
File Interpreter ABI Platform
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}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page