PHP code example of jgi / swedish-dates-bundle

1. Go to this page and download the library: Download jgi/swedish-dates-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jgi / swedish-dates-bundle example snippets


new JGI\SwedishDatesBundle\JGISwedishDatesBundle(),

$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