jongotlin / danish-dates-bundle
Symfony bundle for jongotlin/danish-dates
2.0.0
2022-09-02 19:54 UTC
Requires
- php: >=5.4.0
- jgi/swedish-dates: ^3.0
- jgi/swedish-dates-bundle: ^1.2
- jongotlin/danish-dates: ^1.0
- symfony/config: ^2.8 || ^3.0 || ^4.0 || ^5.0
- symfony/dependency-injection: ^2.8.3 || ^3.0.3 || ^4.0 || ^5.0
- symfony/http-kernel: ^2.8 || ^3.0 || ^4.0 || ^5.0
- twig/twig: ^2.0
This package is auto-updated.
Last update: 2024-11-30 02:10:49 UTC
README
Installation
Install with composer
$ composer require jongotlin/danish-dates-bundle
Add the bundle to your AppKernel.
new JGI\DanishDatesBundle\JGIDanishDatesBundle(),
Usage
$date = $container->get('jgi.danish_dates.datemanager')->getDate(new \Datetime('2018-01-01')); echo $date->getDateTime()->format('Y-m-d') . ": " . ($date->isRedDay() ? 'red day' : 'not red day') . ' - ' . $date->getName(); // 2018-01-01: red day - Nytårsdag
License
Bundle under the MIT License