Metadata-Version: 2.1
Name: leapseconds
Version: 2023.3.0
Summary: Data for official leap seconds, provided as a tuple of Unix timestamps
Project-URL: Homepage, https://github.com/jamielinux/leapseconds
Project-URL: Issues, https://github.com/jamielinux/leapseconds/issues
Project-URL: Source, https://github.com/jamielinux/leapseconds
Author-email: Jamie Nguyen <j@jamielinux.com>
License: Copyright © 2023 Jamie Nguyen <j@jamielinux.com>
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: iers,leap,seconds
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
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 :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# leapseconds

[![PyPi Version][pypi-img]][pypi-url]
[![License][license-img]][license-url]
[![Continuous Integration][ci-img]][ci-url]
[![Code Coverage][coverage-img]][coverage-url]
[![Python Versions][python-img]][python-url]

[pypi-img]: https://img.shields.io/pypi/v/leapseconds.svg
[pypi-url]: https://pypi.org/project/leapseconds
[license-img]:  https://img.shields.io/github/license/jamielinux/leapseconds.svg
[license-url]: https://github.com/jamielinux/leapseconds/blob/main/LICENSE
[ci-img]: https://github.com/jamielinux/leapseconds/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/jamielinux/leapseconds/actions/workflows/ci.yml
[coverage-img]: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/jamielinux/7c0026bdbd4a00863dcd6878e5e3b943/raw/leapseconds.covbadge.json
[coverage-url]: https://github.com/jamielinux/leapseconds/actions/workflows/ci.yml
[python-img]: https://img.shields.io/pypi/pyversions/leapseconds.svg
[python-url]: https://pypi.org/project/leapseconds

---

**leapseconds** is a Python library with data on official leap seconds, provided as a
tuple of Unix timestamps.

Source data: [https://www.ietf.org/timezones/data/leap-seconds.list][0]

[0]: https://www.ietf.org/timezones/data/leap-seconds.list

## Installation

```console
pip install leapseconds
```

## Usage

```python
from leapseconds import LEAP_SECONDS

# Check if a Unix timestamp represents an officially announced leap second:
if 63072000 in LEAP_SECONDS:
    print("True")
```

- **`LEAP_SECONDS`**:
  - A `tuple` of Unix timestamps (`int`) that represent officially announced leap
    seconds in chronological order.

## License

`leapseconds` is distributed under the terms of the [MIT][license] license.

[license]: https://spdx.org/licenses/MIT.html
