Download the PHP package topaz/holidays without Composer
On this page you can find all versions of the php package topaz/holidays. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package holidays
Public Holiday
This package uses the Google Calendar API to fetch public holidays. The data always comes with 3 years data; the previous year, the current year and next year.
How to use
composer require topaz/holidays
- Register for an API key on Google console https://phpcoder.tech/get-list-of-holidays-using-google-calendar-api/
- Add your key [GOOGLE_CALENDAR_API_KEY] to your
.env
file - Import
LazHoliday\PublicHoliday
Sample Usage
Available methods
- fetch(string $country): PublicHoliday - Get all the calendar data when a country is passed
- getData(): array - Return all the 3 years calendar data with some info
- getItems(): array - Return all the 3 years calendar data
- getDataForYear(int $year): array - Filter holiday data by year
- getSummary(): array - Get the summary and dates of the holidays
Country codes
https://gist.github.com/seanblanchfield/4df78d73c85b149133615c7953894076
License
This project uses the MIT License feel free to contribute.
All versions of holidays with dependencies
PHP Build Version
Package Version
The package topaz/holidays contains the following files
Loading the files please wait ....