Skip to main content
https://badge.fury.io/py/sickdt.svg

Opinionated wrapper over the built-in datetime module. Exposes a subset of just the right functionality to avoid common gotchas with dates in Python.

Yo, these datetimes are sick!

~anonymous

Features

  • Robust, automated timezone handling.

  • ISO 8601-compliant timestamp strings.

  • Unix epoch seconds.

  • Only depends on Python standard library.

  • Uses built-in data types: datetime, float, str.

Driving Principles

  • A datetime object represents an instant, a particular point in time. A snapshot of the universe. It doesn’t matter what was the timezone, DST mode, the user’s calendar, nor their locale.

  • A datetime on its own isn’t human-readable. If you need to show it to the user, you need to provide the timezone or locale.

  • All datetime objects must be timezone-aware.

  • When in need of string timestamps, use ISO 8601 with milliseconds and Zulu time.

  • When in need of numerical timestamps, use a float for UNIX epoch seconds in UTC.

  • This must be easy to integrate with existing codebase. No custom data types over stdlib.

  • Inspired by the design choices of NSDate.

Similar Projects

  • Arrow. Requires a total buy-in, you have to switch to using their datatypes.

Download files

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

Source Distribution

sickdt-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sickdt-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file sickdt-0.1.0.tar.gz.

File metadata

  • Download URL: sickdt-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for sickdt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fa103c47cd6042c612ea7c24c76554b6cd528c6ef988365b3fee37a3f7435d9a
MD5 9e315d7562b89efc1c4bd7eb617cc650
BLAKE2b-256 336b828d1a22958a0ff5c59a1cc0406e1a9457e233e87ea7951126c42805af49

See more details on using hashes here.

File details

Details for the file sickdt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sickdt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for sickdt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f81a05541dcea327ad4058cff5eefd175d25f3cefa611443b3d28c96368ea86
MD5 62dd170099891a8c7d56d551a7bb7f46
BLAKE2b-256 79499325b955c051e9d998e92b2d41d02c342357b59987847b46be7d72a9a84d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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