Skip to main content

Library that introduces a Day datatype that is universal across every year

Project description

OnlyDay

Python library that introduces a Day datatype that is universal across every year.

A day representing November 3rd will represent the same year-less day across every year. A Day object representing November 3rd is valid for both 2020-11-03 and 2022-11-03.

from datetime import datetime

from onlyday import Day

first_date = datetime(year=2022, month=11, day=3)

first_day = Day(first_date)
second_day = Day("1999-11-03")

assert first_day == second_day
assert first_day == first_date
assert second_day == first_date

Pandas and NumPy are both supported but aren't necessary.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onlyday-0.1.1.tar.gz (10.0 kB view hashes)

Uploaded Source

Built Distribution

OnlyDay-0.1.1-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page