genstor / twig-age-extension
This package is abandoned and no longer maintained.
No replacement package was suggested.
Simple Twig extension to calculate the age in years based on a DateTime instance or a simple string
1.0.4
2016-12-26 16:47 UTC
Requires
- php: >=5.3.0
- twig/twig: >=1.12
This package is not auto-updated.
Last update: 2022-11-12 09:38:54 UTC
README
Simple Twig extension to calculate the age in years based on a DateTime instance or a string
Installation
Install via composer:
composer require genstor/twig-age-extension:@dev
Add the following to your services.yml file:
services: twig.extension.date: class: Genstor\Twig\AgeExtension tags: - { name: twig.extension }
Usage
{{ user.birthdate | age }}