src/Contao/Event/Subscriber.php
private static function renderDateTimeValueInstance($event, $value)
    {
        if (!($value instanceof \DateTime)) {
            return;
        }

        $dispatcher = $event->getEnvironment()->getEventDispatcher();

        $event->setRendered(
            self::parseDateTime($dispatcher, self::getConfig()->get('datimFormat'), $value->getTimestamp())
        );
    }
private static function renderDateTimeValueInstance($event, $value)
    {
        if (!($value instanceof \DateTime)) {
            return;
        }

        $dispatcher = $event->getEnvironment()->getEventDispatcher();

        $event->setRendered(
            self::parseDateTime($dispatcher, self::getConfig()->get('datimFormat'), $value->getTimestamp())
        );
    }
private static function renderDateTimeValueInstance ( $ event , $ value ) { if ( ! ( $ value instanceof \ DateTime ) ) { return ; } $ dispatcher = $ event -> getEnvironment ( ) -> getEventDispatcher ( ) ; $ event -> setRendered ( self :: parseDateTime ( $ dispatcher , self :: getConfig ( ) -> get ( 'datimFormat' ) , $ value -> getTimestamp ( ) ) ) ; }
Render datetime if the value is instance of datetime .

@param RenderReadablePropertyValueEvent $event The event to store the value to.
@param int                              $value The value to format.

@return void
Render datetime if the value is instance of datetime .