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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file onlyday-0.1.1.tar.gz.

File metadata

  • Download URL: onlyday-0.1.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for onlyday-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e122caaa6ce3333502a99a5ac3d1b88d18f3364d43581f5cb47dc9aa2519bea3
MD5 f40ba3e254573f4c61ea4820f85c5aeb
BLAKE2b-256 d67a636195b46cc1979cfafaa168c756c65ddb77fb4a6b834e93e3084a88d81c

See more details on using hashes here.

File details

Details for the file OnlyDay-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: OnlyDay-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for OnlyDay-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6357259fe7793db55af0fc2bfccbbefee343d28ce49f9412a8e26784f25abd22
MD5 a102188ac840a12bf45a3cbeadb66836
BLAKE2b-256 f8c5fbaf32afd483823900cae853d7b8357f15a74d99d2c3fe17fdcaa567531a

See more details on using hashes here.

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