Metadata-Version: 2.1
Name: sedate
Version: 1.0.2
Summary: Date/time helper functions used by various Seantis packages.
Home-page: http://github.com/seantis/sedate
Author: Seantis GmbH
Author-email: info@seantis.ch
License: GPLv2
Project-URL: Bug Tracker, http://github.com/seantis/sedate/issues
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Provides-Extra: dev

Sedate
======

.. image:: https://img.shields.io/pypi/v/sedate.svg
    :target: https://pypi.org/project/sedate
    :alt: PyPI version

.. image:: https://img.shields.io/pypi/pyversions/sedate.svg
    :target: https://pypi.org/project/sedate
    :alt: Python versions

.. image:: https://github.com/seantis/sedate/actions/workflows/python-tox.yaml/badge.svg
    :target: https://github.com/seantis/sedate/actions
    :alt: Tests

.. image:: https://codecov.io/gh/seantis/sedate/branch/master/graph/badge.svg?token=gMGL85OASa
    :target: https://codecov.io/gh/seantis/sedate
    :alt: Codecov.io

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
   :target: https://github.com/pre-commit/pre-commit
   :alt: pre-commit

Date/time helper functions used by various Seantis packages.

There are projects like `Arrow <https://github.com/crsmithdev/arrow>`_ or
`Delorean <https://github.com/crsmithdev/arrow>`_ 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 <http://semver.org/>`_


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.2 (2022-08-10)
~~~~~~~~~~~~~~~~~~~

- Adds back removed ``weeknumber`` function
  [Daverball]

1.0.1 (2022-08-09)
~~~~~~~~~~~~~~~~~~~

- Fixes GPLv2 License Classifier in `setup.cfg`
  [Daverball]

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
