jgi/swedish-dates-bundle

Symfony bundle for jgi/swedish-dates

1.2.9 2022-09-03 06:58 UTC

This package is auto-updated.

Last update: 2024-04-30 00:29:34 UTC


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