dev-master
9999999-dev http://github.com/guzzlefry/twig-age-extension#READMESimple Twig extension to calculate the age in years based on a DateTime instance
MIT
The Requires
- twig/twig >=1.12
- php >=5.3.0
by Gus King
templating twig date age
Wallogit.com
2017 © Pedro Peláez
Simple Twig extension to calculate the age in years based on a DateTime instance
Simple Twig extension to calculate the age in years based on a DateTime instance, (*1)
Install via composer:, (*2)
composer require guzzlefry/twig-age-extension:@dev
Add the following to your services.yml file:, (*3)
services:
twig.extension.date:
class: Guzzlefry\Twig\AgeExtension
tags:
- { name: twig.extension }
{{ user.birthdate | age }}
Simple Twig extension to calculate the age in years based on a DateTime instance
MIT
templating twig date age