public function shortcodeDate(Event $event, array $atts, $content, $tag)
    {
        if (!empty($atts['format']) && !empty($content)) {
            if (is_numeric($content)) {
                return date($atts['format'], $content);
            } else {
                return date($atts['format'], strtotime($content));
            }
        }

        return '';
    }
public function shortcodeDate(Event $event, array $atts, $content, $tag)
    {
        if (!empty($atts['format']) && !empty($content)) {
            if (is_numeric($content)) {
                return date($atts['format'], $content);
            } else {
                return date($atts['format'], strtotime($content));
            }
        }

        return '';
    }
public function shortcodeDate ( Event $ event , array $ atts , $ content , $ tag ) { if ( ! empty ( $ atts [ 'format' ] ) && ! empty ( $ content ) ) { if ( is_numeric ( $ content ) ) { return date ( $ atts [ 'format' ] , $ content ) ; } else { return date ( $ atts [ 'format' ] , strtotime ( $ content ) ) ; } } return '' ; }
Implements the "date" shortcode.

{date format=d-m-Y}2014-05-06{/date}

@param \Cake\Event\Event $event The event that was fired
@param array $atts An associative array of attributes, or an empty string if
no attributes are given
@param string $content The enclosed content (if the shortcode is used in its
enclosing form)
@param string $tag The shortcode tag
@return string
Implements the date shortcode .