joaofigueira / portugal-holidays
List of holidays of a given year or a series of years.
v1.1.0
2021-04-19 18:38 UTC
Requires
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-12-20 02:33:33 UTC
README
Lists holidays of Portugal for a given year or a series of years.
Installation
Install using Composer
$ composer require joaofigueira/portugal-holidays
Usage
List using internal reference files:
use Holidays\Holidays; use Holidays\Clients\Json; use Holidays\Handlers\File; $client = new Json; $handler = new File; $holidays = new Holidays($client, $handler); $result = $holidays->get($years)->asArray();
List using external webservice call:
use Holidays\Holidays; use Holidays\Clients\Http; use Holidays\Handlers\Xml; $client = new Http; $handler = new Xml; $holidays = new Holidays($client, $handler); $result = $holidays->get($years)->asArray();
Contribute
You can clone and contribute to this project.
Setup local environment:
- make sure you have docker installed in your machine.
- clone the project.
- run setup:
$ ./setup.sh
. You may have to$ chmod +x setup.sh
to be able to run the script. This will create the docker container and run composer install for you. - run tests:
$ ./run-tests.sh
.