Skip to main content

A Python package for determining whether a given date is a workday or a holiday in Taiwan, based on the official administrative calendar.

Project description

taiwan-holidays

taiwan-holidays is a Python package designed to check whether a specific date is a workday or a holiday in Taiwan, based on the official work calendar provided by the Taiwan government.

coverage license

Features

  • Determine if a date is a workday or holiday.
  • Support for official Taiwan government work calendar rules, including special adjusted workdays and holidays.
  • Easy-to-use API for date checking.

Installation

You can install taiwan-holidays via pip:

pip install taiwan-holidays

Usage

Here's how you can use taiwan-holidays in your Python project.

Example

calendar = TaiwanCalendar()
date = dateutil.parser.parse('2024-12-08')
print(calendar.is_holiday(date))
print(calendar.is_holiday('2024-12-08'))
print(calendar.is_holiday('20241208'))
print(calendar.is_holiday('2024/12/08'))

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Special thanks to the Taiwan government for providing the official administrative calendar as the basis for this package.

Feel free to report any issues or suggest new features in the Issues section.

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

taiwan_holidays-0.2.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

taiwan_holidays-0.2.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file taiwan_holidays-0.2.0.tar.gz.

File metadata

  • Download URL: taiwan_holidays-0.2.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for taiwan_holidays-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cfdc0ff352efe122a482891a02fd7bceab7d74c28c82738c891644db0397afe5
MD5 e27f85fe7e82d03345bd1a22f22c93b9
BLAKE2b-256 8b14132bfaf2aecf948ef0f4d0480e3fedfc15e5aebf4346a85f2524401c6621

See more details on using hashes here.

File details

Details for the file taiwan_holidays-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for taiwan_holidays-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 758fd165d574d6a0c4520e69115a27789c26b660134dcf940911d59eb6eb1213
MD5 d0a92e52347d1e5aa003851b235b17a6
BLAKE2b-256 7c377180306dbb708feae82ff070a53f0a6a96f03b025d8d812faacebb358fe6

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