jongotlin/danish-dates-bundle

Symfony 插件用于 jongotlin/danish-dates

2.0.0 2022-09-02 19:54 UTC

This package is auto-updated.

Last update: 2024-08-30 01:43:49 UTC


README

安装

使用 composer 安装

$ composer require jongotlin/danish-dates-bundle

将插件添加到您的 AppKernel。

new JGI\DanishDatesBundle\JGIDanishDatesBundle(),

使用

$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

许可

本插件受 MIT 许可证保护