nojimage / holiday-jp
This package will obtain information on Japanese public holidays based on the calendar information from the National Astronomical Observatory of Japan.
v1.2.0
2024-08-09 05:04 UTC
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- ext-mbstring: *
- cakephp/chronos: ^2.4|^3.0
- johngrogg/ics-parser: ^3
Requires (Dev)
- cakephp/collection: ^4.5|^5.0
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^9|^10|^11
- squizlabs/php_codesniffer: ^3.10
README
Overview
This package will obtain information on Japanese public holidays based on the calendar information from the National Astronomical Observatory of Japan.
NOTE: Public holiday information before 2001 cannot be obtained.
Via: 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 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')); // Determine if it 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.