joaofigueira/portugal-holidays

List of holidays of a given year or a series of years.

Installs: 94

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/joaofigueira/portugal-holidays

v1.1.0 2021-04-19 18:38 UTC

This package is auto-updated.

Last update: 2025-09-20 04:22:57 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.