src/Phlexible/Bundle/CmsBundle/Twig/Extension/MiscExtension.php
public function age($date1, $date2 = null)
    {
        $formatter = new AgeFormatter();

        return $formatter->formatDate($date1, $date2);
    }
public function age($date1, $date2 = null)
    {
        $formatter = new AgeFormatter();

        return $formatter->formatDate($date1, $date2);
    }
public function age ( $ date1 , $ date2 = null ) { $ formatter = new AgeFormatter ( ) ; return $ formatter -> formatDate ( $ date1 , $ date2 ) ; }
Return age string for given date.

@param string      $date1
@param string|null $date2

@return string
Return age string for given date .