jgi / swedish-dates-bundle
Symfony bundle for jgi/swedish-dates
1.2.9
2022-09-03 06:58 UTC
Requires
- php: >=5.4.0
- jgi/swedish-dates: ^3.1.16
- twig/twig: ^2.0|^3.0
README
Installation
Install with composer
$ composer require jgi/swedish-dates-bundle
Add the bundle to your AppKernel.
new JGI\SwedishDatesBundle\JGISwedishDatesBundle(),
Usage
$date = $container->get('jgi.swedish_dates.datemanager')->getDate(new \Datetime('2014-12-25')); echo $date->getDateTime()->format('Y-m-d') . ": " . ($date->isRedDay() ? 'red day' : 'not red day') . ' - ' . $date->getName(); // 2014-12-25: red day - Juldagen
License
Bundle under the MIT License