FixDateIt
| Category | Status' and Links |
|---|---|
| General | |
| CD/CI | |
| PyPI | |
| Github |
Overview
FixDateIt is a Python library designed to intelligently correct and normalize date strings into a standard format. It handles various common date formats, separators, and even attempts to fix common data entry errors.
Key Features
- Format Normalization: Converts various input date formats (e.g., YMD, DMY) into a consistent output format (defaulting to
%Y%m%d). - Flexible Separators: Automatically handles different separators like
/,-, and.. - Heuristic Corrections:
- Century Guessing: Automatically adds the correct century (1900s or 2000s) for two-digit years.
- Day/Month Swapping: Detects and fixes cases where day and month might have been swapped (e.g., if month > 12).
- Out-of-range Day Correction: Can optionally cap days to the maximum valid day for a given month (e.g., setting Feb 30th to Feb 28th/29th).
- Numeric String Parsing: Handles compact numeric strings (e.g., "20230101" or "010123") by intelligently inserting separators before parsing.
- Month Name Support: Recognizes three-letter month abbreviations (e.g., "JAN", "FEB").
Basic Usage
from fixdate import FixDate
# Basic conversion
fd = FixDate("01-15-2023", p_in_format="MDY")
print(fd.date_str) # Output: 20230115
# Fixing swapped day/month
fd = FixDate("31/12/2023", p_in_format="MDY")
print(fd.date_str) # Output: 20231231
# Handling abbreviations
fd = FixDate("15-JAN-23", p_in_format="DMY")
print(fd.date_str) # Output: 20230115
Metadata
Release files for FixDate 2.1.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 | Provenance | Actions |
|---|---|---|---|---|
| fixdate-2.1.0.tar.gz | 5.6 kB | Without provenance | Details for fixdate-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fixdate-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for fixdate-2.1.0-py3-none-any.whl |
Total release size: 11.0 kB
Release files / fixdate-2.1.0.tar.gz
| Download URL | fixdate-2.1.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13232f1450b9d67277b4565ea39142e54f9a7da64f303f96a63aa533e911acc1
|
|
BLAKE2b-256 checksum How to use checksums |
2805a1c8c2b5e37966b27403f1155be378975c7cc8bbebe046f06dbb0cd85910
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.11 Linux/6.11.0-1018-azure
|
Release files / fixdate-2.1.0-py3-none-any.whl
| Download URL | fixdate-2.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6a02d05092e1a1f15158aa3202c523e954401cc09ce1db086637b61342a913a
|
|
BLAKE2b-256 checksum How to use checksums |
76d43dcbde225336895c690c8367726fe43af5c8969f6c761ab2ab0dad5fb6a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.11 Linux/6.11.0-1018-azure
|
Security for FixDate 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.