Metadata-Version: 2.4
Name: japan-holidays
Version: 1.0.0
Summary: Japanese public holidays from the Cabinet Office CSV
Author-email: "Tomohiro Kaneda (Kurashina Design)" <oss@kurashina.jp>
License-Expression: MIT
Project-URL: Homepage, https://japan-holidays.kurashina.jp/
Project-URL: Documentation, https://japan-holidays.kurashina.jp/docs/getting-started
Project-URL: Repository, https://github.com/kurashina-design/japan-holidays
Project-URL: Issues, https://github.com/kurashina-design/japan-holidays/issues
Project-URL: Changelog, https://github.com/kurashina-design/japan-holidays/blob/main/CHANGELOG.md
Keywords: japan,japanese,holiday,holidays,public holidays,calendar,shukujitsu,祝日
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Natural Language :: Japanese
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Office/Business :: Scheduling
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Dynamic: license-file

# Japan Holidays

Japanese public holiday lookups for Python 3.9+ using bundled Cabinet Office data.

```python
from datetime import date

from japan_holidays import get_holiday, get_holidays, get_holidays_for_month, is_holiday

for holiday in get_holidays(2026):
    print(holiday.date, holiday.name, holiday.japanese_era_date)
get_holidays(2026, order="desc")

for holiday in get_holidays_for_month(2026, 5):
    print(holiday.date, holiday.name, holiday.japanese_era_date)
get_holidays_for_month(2026, 5, order="desc")

holiday = get_holiday(2026, 11, 23)
if holiday is not None:
    print(holiday.name, holiday.date, holiday.japanese_era_date)
get_holiday(2026, 11, 24)  # None
is_holiday(date(2026, 11, 23))  # True
```

Year and month listings default to ascending date order and accept order="desc".
Daily lookups return a Holiday object. A covered day without a holiday returns None.
`get_holiday` takes a `datetime.date` or the integer year, month, and day as
positional arguments. Arguments of the wrong type, such as a string or a
`datetime`, raise TypeError. Invalid dates, months, orders, and uncovered years
raise ValueError.

Holiday objects contain `name`, `date` (datetime.date), and `japanese_era_date`
(for example, 令和8年1月1日). Use `holiday.date.isoformat()` for JSON dates.
Era year one is displayed as 元年.

See the [documentation](https://japan-holidays.kurashina.jp/) and the
[source repository](https://github.com/kurashina-design/japan-holidays), and
the included `NOTICE` for the data source and terms.
