Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
guzzlefry authored Jul 6, 2016
1 parent 590704b commit c338509
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# twig-age-extension
Simple Twig extension to calculate the age in years based on a DateTime instance

## Installation

Install via composer:
```
composer require guzzlefry/twig-age-extension:@dev
```

Add the following to your services.yml file:
```yaml
services:
twig.extension.date:
class: Guzzlefry\Twig\AgeExtension
tags:
- { name: twig.extension }
```
## Usage
```
{{ user.birthdate | age }}
```

0 comments on commit c338509

Please sign in to comment.