Skip to content
forked from azuyalabs/yasumi

Yasumi is an easy PHP Library for calculating national holidays.

License

Notifications You must be signed in to change notification settings

nucreativa/yasumi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Yasumi

Yasumi (Japanese for Holiday) is an easy PHP library to help you calculate the dates and names of holidays and other special celebrations from various countries/states. Many services exist on the internet that provide holidays, however are either not free or offer only limited information. In addition, no complete PHP library seems to exist today that covers a wide range of holidays and countries, except maybe PEAR's Date_Holidays which unfortunately hasn't been updated for a while.

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) so it is easy to add new holiday providers that calculate holidays. The methods of Yasumi can be used to get a holiday's date and name in various languages.

Highlights

  • Simple API
  • Use of Providers to easily extend and expand new Holidays
  • Implements ArrayIterator to easily process a provider's holidays
  • Fully documented
  • Fully Unit tested
  • Framework-agnostic
  • Composer ready, PSR-2 compliant

Currently the following holiday providers are implemented:

  • Japan
  • Netherlands

Documentation

TBD

System Requirements

You need PHP >= 5.5.0 and the intl extension to use azuyalabs/yasumi but the latest stable version of PHP is recommended.

Installation

Install azuyalabs/yasumi using Composer.

$ composer require azuyalabs/yasumi

Testing

Yasumi has a PHPUnit test suite. To run the tests, run the following command from the project folder:

$ phpunit

The tests are organized in additional test suites:

  • Base : For testing the base functionality of Yasumi
  • Japan : For separately testing the Japan Holiday Provider
  • Netherlands: For separately testing the Netherlands Holiday Provider

License

The MIT License (MIT). Please see LICENSE for more information.

About

Yasumi is an easy PHP Library for calculating national holidays.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%