Thanks to visit codestin.com
Credit goes to github.com

Skip to content

nojimage/holiday-jp-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Holiday in Japan

License Packagist Version (custom server) Build Status

Overview

This package obtains information on Japanese public holidays based on the calendar information from the National Astronomical Observatory of Japan.

NOTE: Public holiday information before 2001 is not available.

Source: National Astronomical Observatory of Japan

Requirements

  • PHP 8.2 or above

Installation

composer require nojimage/holiday-jp

Usage

use Nojimage\HolidayJp\HolidayJp;

$holidayJp = new HolidayJp();

// Get a list of holidays in 2024
$holidays = $holidayJp->getHolidays(2024);

// Get a list of holidays for the specified period
$holidays = $holidayJp->getHolidays(new DateTime('2024-01-01'), new DateTime('2024-12-31'));

// Check if a date is a holiday
$holidayJp->isHoliday('2024-01-01'); // true
$holidayJp->isHoliday('2024-01-02'); // false

Contributing

If you find any bugs or have suggestions for new features, please create an issue or submit a pull request.

License

This project is released under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages