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.3.0.tar.gz (11.3 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.3.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: taiwan_holidays-0.3.0.tar.gz
  • Upload date:
  • Size: 11.3 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.3.0.tar.gz
Algorithm Hash digest
SHA256 a9fd6fcc738bde32294209a6afbe4b9ea91b3146440da38cf57084036fde8b46
MD5 4d23d34f732477058f2f3174d5b6f32b
BLAKE2b-256 40d5f5e9eab9a69f74fc90f34f8180819ab859497412108d84fe34ebc33f8d44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for taiwan_holidays-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cd393c470a8e545d9985ea661058a7afe715b0e2da0b7ab34802045edb17544
MD5 acfd62c5d3bbd27d01a89f9c808a6238
BLAKE2b-256 e3357557e1f1f45b456e38fb6ffae2470b14b678547a47ee6b13c4cfc402c407

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