Skip to main content

JPHoliday

https://img.shields.io/pypi/v/jpholiday.svg https://img.shields.io/pypi/l/jpholiday.svg https://img.shields.io/pypi/pyversions/jpholiday.svg https://img.shields.io/github/contributors/lalcs/jpholiday.svg

日本の祝日を取得するライブラリ

Installation

$ pip install jpholiday

Sample Code

# 指定日の祝日名を取得
import jpholiday
import datetime
jpholiday.is_holiday_name(datetime.date(2017, 1, 1))
> '元日'
jpholiday.is_holiday_name(datetime.date(2017, 1, 2))
> '元日 振替休日'
jpholiday.is_holiday_name(datetime.date(2017, 1, 3))
> None

# 指定日が祝日か判定
import jpholiday
import datetime
jpholiday.is_holiday(datetime.date(2017, 1, 1))
> True
jpholiday.is_holiday(datetime.date(2017, 1, 2))
> True
jpholiday.is_holiday(datetime.date(2017, 1, 3))
> False

# 指定年の祝日を取得
import jpholiday
jpholiday.year_holidays(2017)
>[(datetime.date(2017, 1, 1), '元日'),
 (datetime.date(2017, 1, 2), '元日 振替休日'),
 (datetime.date(2017, 1, 9), '成人の日'),
 (datetime.date(2017, 2, 11), '建国記念の日'),
 (datetime.date(2017, 3, 20), '春分の日'),
 (datetime.date(2017, 4, 29), '昭和の日'),
 (datetime.date(2017, 5, 3), '憲法記念日'),
 (datetime.date(2017, 5, 4), 'みどりの日'),
 (datetime.date(2017, 5, 5), 'こどもの日'),
 (datetime.date(2017, 7, 17), '海の日'),
 (datetime.date(2017, 8, 11), '山の日'),
 (datetime.date(2017, 9, 18), '敬老の日'),
 (datetime.date(2017, 9, 23), '秋分の日'),
 (datetime.date(2017, 10, 9), '体育の日'),
 (datetime.date(2017, 11, 3), '文化の日'),
 (datetime.date(2017, 11, 23), '勤労感謝の日'),
 (datetime.date(2017, 12, 23), '天皇誕生日')]

# 指定月の祝日を取得
import jpholiday
jpholiday.month_holidays(2017, 5)
>[(datetime.date(2017, 5, 3), '憲法記念日'),
 (datetime.date(2017, 5, 4), 'みどりの日'),
 (datetime.date(2017, 5, 5), 'こどもの日')]

# 指定範囲の祝日を取得
import jpholiday
import datetime
jpholiday.holidays(datetime.date(2017, 1, 1), datetime.date(2017, 5, 3))
>[(datetime.date(2017, 1, 1), '元日'),
 (datetime.date(2017, 1, 2), '元日 振替休日'),
 (datetime.date(2017, 1, 9), '成人の日'),
 (datetime.date(2017, 2, 11), '建国記念の日'),
 (datetime.date(2017, 3, 20), '春分の日'),
 (datetime.date(2017, 4, 29), '昭和の日'),
 (datetime.date(2017, 5, 3), '憲法記念日')]

Metadata

Release files for jpholiday 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jpholiday 0.0.6
File Size Uploaded
jpholiday-0.0.6.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jpholiday 0.0.6
File Interpreter ABI Platform
jpholiday-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / jpholiday-0.0.6.tar.gz

Download URL jpholiday-0.0.6.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0b07087dae61bf9dc4d6fff8a49ac8f85b632e5777762ede3ddfd32d79ba7e53
BLAKE2b-256 checksum
How to use checksums
6bd471be74a5e60bf53af9935439188881980dd509f32c3cc50a499988038755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Release files / jpholiday-0.0.6-py3-none-any.whl

Download URL jpholiday-0.0.6-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e295927c077818690c88c523b6b42ddf8bd182092144bc728f2c7d4f5aa10b43
BLAKE2b-256 checksum
How to use checksums
0c44f4f9ac6ea13c1247456dd38123262796612a00b0c6b8082434f4dae12555
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Release history Release notifications | RSS feed

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.7

2 release files

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page