Skip to content

Simple utility to check if given date is holiday in Czech Republic.

Notifications You must be signed in to change notification settings

kucharovic/czech-holidays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CzechHolidays

Simple and lighweight utility to check if given date is holiday in Czech Republic. If you need more than Czech holidays, I recommend Yasumi library.

Installation with Composer

php composer require kucharovic/czech-holidays

Usage

<?php
require __DIR__.'/vendor/autoload.php';

use JK\Utils\CzechHolidays;
use DateTimeImmutable;

$day = DateTimeImmutable::createFromFormat('Y-m-d', '2018-01-01');

var_dump(CzechHolidays::isHoliday($day)); // bool(true)
echo CzechHolidays::getHolidayName($day) // Nový rok

CzechHolidays

Jednoduchý PHP nástroj na práci s českými svátky (včetně Velikonoc). Pokud potřebujete pracovat se svátky několika zemí (včetně ČR), doporučuji knihovnu Yasumi.

Instalace pomocí nástroje Composer

php composer require kucharovic/czech-holidays

Použití

<?php
require __DIR__.'/vendor/autoload.php';

use JK\Utils\CzechHolidays;
use DateTimeImmutable;

$day = DateTimeImmutable::createFromFormat('Y-m-d', '2018-01-01');

var_dump(CzechHolidays::isHoliday($day)); // bool(true)
echo CzechHolidays::getHolidayName($day) // Nový rok

About

Simple utility to check if given date is holiday in Czech Republic.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages