Skip to main content

Holiday in Japan from Google Calendar.

Project description

Features

  • 10000 call within 1 seconds

Installation

$ pip install japan_holiday

Sample Code

# 今日が祝日か判定(today is holiday)
from japan_holiday import JapanHoliday
JapanHoliday(google_api_token).today()
>>>False

# 今日が祝日若しくは週末か判定(today is holiday or weekend)
JapanHoliday(google_api_token).today(weekend=True)
>>>True

# 指定日が祝日若しくは週末か判定(the chosen day is holiday or weekend)
from datetime import datetime
now = datetime(2016, 1, 8, 00, 00, 00)
JapanHoliday(google_api_token).check(now=now, weekend=True)
>>>True

# list
JapanHoliday(google_api_token).get_holiday_calender(2015)
>>>[元日:2015/1/1, 成人の日:2015/1/12, 建国記念の日:2015/2/11, 春分の日:2015/3/21, 昭和の日:2015/4/29, 憲法記念日:2015/5/3, みどりの日:2015/5/4, こどもの日:2015/5/5, 憲法記念日 振替休日:2015/5/6, 海の日:2015/7/20, 敬老の日:2015/9/21, 国民の休日:2015/9/22, 秋分の日:2015/9/23, 体育の日:2015/10/12, 文化の日:2015/11/3, 勤労感謝の日:2015/11/23, 天皇誕生日:2015/12/23]

# test
py.test ./tests.py
...

Documentation

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

japan_holiday-0.0.5.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file japan_holiday-0.0.5.tar.gz.

File metadata

  • Download URL: japan_holiday-0.0.5.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for japan_holiday-0.0.5.tar.gz
Algorithm Hash digest
SHA256 1702e7246eb3a049177f1f27e9932efbbb8bc0a12227481f72edbcd0ea001ad8
MD5 abd823899d5a49f4c7e4124712833b60
BLAKE2b-256 c58b7c41851bef3d7318da1395b42c21ecf24f588bcb18ddb494bb13509bb1db

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