Skip to main content

Date/time helper functions used by various Seantis packages.

Project description

PyPI version Python versions Tests Codecov.io pre-commit

Date/time helper functions used by various Seantis packages.

There are projects like Arrow or Delorean which provide ways to work with timezones without having to think about it too much.

Seantis doesn’t use them because we want to reason about these things, to ensure they are correct, and partly because of self-loathing.

Adding another layer makes this reasoning harder.

Run the Tests

Install tox and run it:

pip install tox
tox

Limit the tests to a specific python version:

tox -e py37

Conventions

Sedate follows PEP8 as close as possible. To test for it run:

tox -e lint

Sedate uses Semantic Versioning

Development

Setup your local development environment:

python3.8 -m venv venv
source venv/bin/activate
pip install .[dev]
pre-commit install

License

sedate is released under GPLv2

Changelog

1.0.1 (2022-08-09)

  • Fixes GPLv2 License Classifier in setup.cfg

1.0.0 (2022-08-09)

  • Fixes align_to_week and align_to_month not behaving consistently with align_to_day during DST transitions [Daverball]

  • Fixes DST related issues in get_date_range, dtrange and weekrange

    With this change these functions now accept additional arguments that determine what happens with ambiguous, non-existent times during daylight savings transitions. [Daverball]

  • Adds type annotations [Daverball]

  • Removes support for Python 2.7 and 3.6 and below [Daverball]

  • Removes explicit support for Python 3.3 (might or might not work). [href]

0.3.0 (2018-02-12)

  • Adds a weeknumber function. [href]

0.2.0 (2017-03-02)

  • Adds the ability to iterate over custom deltas between a start and an end. [href]

  • Adds the ability to iterate over weeks between a start and an end. [href]

0.1.0 (2016-05-12)

  • Adds methods to align dates to months and weeks. [href]

0.0.5 (2016-04-25)

  • Adds a time parsing function which accepts anything from 00:00 to 24:00. [href]

0.0.4 (2015-11-18)

  • Fixes an issue with daylight savings time and align_date_to_day.

    With this change, align_date_to_day ensures that the resulting date is in the timezone the date was aligned to, not in the timezone it originally was in. [href]

0.0.3 (2015-08-05)

  • Adds a function to turn date-ish objects into datetimes. [href]

0.0.2 (2015-08-04)

  • Fix align_date_to_day failing with certain timezones. [href]

0.0.1 (2015-06-30)

  • Initial Release

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

sedate-1.0.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

sedate-1.0.1-py2.py3-none-any.whl (8.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sedate-1.0.1.tar.gz.

File metadata

  • Download URL: sedate-1.0.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for sedate-1.0.1.tar.gz
Algorithm Hash digest
SHA256 45c7e2c84da97ce64a32c5681e841a51d4ad3b2365c5089ca07e539b13e80ad5
MD5 f5b3256f6117175bf35eba22ffe2d32c
BLAKE2b-256 7d1d4c9d1ea8affb0898d74d0704dc530f7c1e807712d521c928d62251b96c4f

See more details on using hashes here.

File details

Details for the file sedate-1.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: sedate-1.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for sedate-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ca9b731b33f43e7a6ec201eed9b25e28a3a5c78c2f022b2088f2c8fd5bb648e1
MD5 d1ec36db955908fcf00a9e675d9e7647
BLAKE2b-256 1161900da606ba70905f84a6d72af72611fd0b4f64d6f340bece1c68e85f6072

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