Skip to main content

Return date for midsummer

Project description

pypi Downloads Downloads versions

Midsummer Date Calculator

This Python module calculates the date of Midsummer's Day for a given year. Midsummer's Day typically falls on a Friday between June 20th and June 26th.

Usage

To use this module, simply import the midsummer_date function and pass the year for which you want to find the Midsummer's Day:

    from midsummer import midsummer_date

    year = 2024
    print(midsummer_date(year))

Functionality

The midsummer_date function calculates the date of Midsummer’s Day for the specified year. If the calculated date does not fall on a Friday, a ValueError is raised.

Exceptions

MidsummerException: Raised if the input year is not an integer or if the date falls outside the expected range. ValueError: Raised if the calculated Midsummer’s Day does not fall on a Friday, as per tradition.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

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

midsummer-0.1.5.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

midsummer-0.1.5-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file midsummer-0.1.5.tar.gz.

File metadata

  • Download URL: midsummer-0.1.5.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.11

File hashes

Hashes for midsummer-0.1.5.tar.gz
Algorithm Hash digest
SHA256 11885e2adfb9aede84ef20bbd671fba2b866879bd921f9177abf7e59976f0320
MD5 a1b5f8170b8bf67092662f1d4c793cd0
BLAKE2b-256 e569605b2cda883c46ab6c3b85a00c68513a36b421f8bd1c8126105b9b574008

See more details on using hashes here.

File details

Details for the file midsummer-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: midsummer-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.11

File hashes

Hashes for midsummer-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 161ed4d51adfefbc9e51baf6c9be607e8da27c00255e902323864cfd4efce106
MD5 3403c947eacbd443f12fc676995cb390
BLAKE2b-256 599b3350638b3922d340084e7e9267eed4d564a505242ced1dc339d27547d190

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page