Skip to content

kruu-com/libholiday

This branch is 64 commits ahead of, 5 commits behind mayflower/libholiday:master.

Folders and files

NameName
Last commit message
Last commit date
Jul 13, 2022
Oct 9, 2024
Oct 9, 2024
Jul 13, 2022
Mar 23, 2015
Nov 23, 2012
Jul 13, 2022
Jul 13, 2022
Jul 13, 2022
Jul 13, 2022
Jul 13, 2022

Repository files navigation

libholiday - A PHP Holiday Library

With this library you can check if a given day is a holiday in selected country or state.

Usage Example

Create instance of CalculatorService:
$holidayService = new CalculatorService();

// Get actual calculator by passing country and optional state
$calculator = $holidayService->getCalculatorByCountryAndState('DE', 'BY');

Run tests

You need to have docker installed. Please run:

This starts the container:
docker compose up -d

This runs the tests:
docker compose exec php /var/app/vendor/bin/phpunit --configuration=/var/app/phpunit.xml

Todos

  • Tests for special holidays like "Tourist Trophy Senior Race Day" on Isle of Man, see Belgium
  • Translations for holidays
  • Code examples

About

Holiday Calculation Library for PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.9%
  • Dockerfile 0.1%