Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jongotlin/danishdatesbundle


https://github.com/jongotlin/danishdatesbundle

Last synced: 15 days ago
JSON representation

Awesome Lists containing this project

README

        

DanishDatesBundle
==================

## Installation

Install with composer
```
$ composer require jongotlin/danish-dates-bundle
```

Add the bundle to your AppKernel.
```php
new JGI\DanishDatesBundle\JGIDanishDatesBundle(),
```

## Usage
```php
$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