PHP Class Knp\Bundle\TimeBundle\Templating\Helper\TimeHelper

Inheritance: extends Symfony\Component\Templating\Helper\Helper
Afficher le fichier Open project: KnpLabs/KnpTimeBundle

Protected Properties

Свойство Type Description
$formatter

Méthodes publiques

Méthode Description
__construct ( DateTimeFormatter $formatter )
diff ( $from, $to = null ) : string Returns a single number of years, months, days, hours, minutes or seconds between the specified date times.
getDatetimeObject ( mixed $datetime = null ) : DateTimeInterfac\DateTimeInterface Returns a DateTime instance for the given datetime
getName ( )

Method Details

__construct() public méthode

public __construct ( DateTimeFormatter $formatter )
$formatter Knp\Bundle\TimeBundle\DateTimeFormatter

diff() public méthode

Returns a single number of years, months, days, hours, minutes or seconds between the specified date times.
public diff ( $from, $to = null ) : string
Résultat string

getDatetimeObject() public méthode

Returns a DateTime instance for the given datetime
public getDatetimeObject ( mixed $datetime = null ) : DateTimeInterfac\DateTimeInterface
$datetime mixed
Résultat DateTimeInterfac\DateTimeInterface

getName() public méthode

public getName ( )

Property Details

$formatter protected_oe property

protected $formatter