azuyalabs / yasumi
The easy PHP Library for calculating holidays
Fund package maintenance!
Other
Installs: 6 769 982
Dependents: 20
Suggesters: 0
Security: 0
Stars: 1 041
Watchers: 19
Forks: 154
Open Issues: 3
Requires
- php: >=8.0
- ext-json: *
Requires (Dev)
- ext-intl: *
- friendsofphp/php-cs-fixer: ^2.19 || ^3.40
- mikey179/vfsstream: ^1.6
- phan/phan: ^5.4
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^8.5 || ^9.6
- vimeo/psalm: ^5.16
Suggests
- ext-calendar: For calculating the date of Easter
- dev-develop
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.8.1
- 1.8.0
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- dev-feature-provider-bulgaria
- dev-dependabot/github_actions/actions/stale-9.0.0
- dev-dependabot/github_actions/actions/cache-4
- dev-dependabot/github_actions/actions/checkout-4
- dev-docs
- dev-master
- dev-mad-cobalt
- dev-support/1.8.x
This package is auto-updated.
Last update: 2024-11-02 13:01:45 UTC
README
Introduction
Yasumi (Japanese for 'Holiday'「休み」) is the easy PHP library that helps you retrieve the dates and names of holidays and other special celebrations from various countries/states. It is calculation and rule driven avoiding the need of a comprehensive database.
Many services exist that can provide holiday information, however are either not entirely free or only offer limited information. In addition, no exhaustive PHP library exists today covering a wide range of holidays and countries. PEAR's Date_Holidays library was a similar attempt, however it hasn't been updated for a long time.
Highlights
The goal of Yasumi is to be powerful while remaining lightweight, by utilizing PHP native classes wherever possible. Yasumi's calculation is provider-based (i.e. by country/state), making it easy to add new holiday providers that calculate holidays.
- Pure PHP
- Straightforward API
- Framework-agnostic
- Use of Providers to easily extend and expand new Holidays
- Common Holiday Providers
- Accounts for the date/time when holidays have been officially established and/or abolished
- Filters enabling to easily select certain holiday types (Official, Observed, Bank, Seasonal or Other)
- Global Translations
- Time zone aware
- Implements ArrayIterator to easily process a provider's holidays
- Fully documented
- Fully unit tested
- Composer ready, PSR-12 and PSR-4 compliant
Documentation
Yasumi’s documentation is available on https://www.yasumi.dev. You will find all the necessary information how to install Yasumi and also recipes how you can use Yasumi in your project.
Blog
Checkout the blog section on documentation site regularly for latest updates. Keeping you informed about any news, releases, etc. in a handy blog post format!
Contributing
Contributions are encouraged and welcome; I am always happy to get feedback or pull requests on GitHub :) Create Github Issues for bugs and new features and comment on the ones you are interested in.
If you enjoy what I am making, an extra cup of coffee is very much appreciated :). Your support helps me to put more time into Open-Source Software projects like this.
License
Yasumi is open-source software licensed under the MIT License (MIT). Please see LICENSE for more information.