Skip to content

Instantly share code, notes, and snippets.

@felixhaeberle
Created January 24, 2020 00:11
Show Gist options
  • Save felixhaeberle/304632124bf7e1a4b38c817a1c50501a to your computer and use it in GitHub Desktop.
Save felixhaeberle/304632124bf7e1a4b38c817a1c50501a to your computer and use it in GitHub Desktop.
Twig calculate age based on birthday date
{% set age = date().diff(date(item.birthday)).y %}
@taydmgch190016
Copy link

nice! Thanks.

@benkimdev
Copy link

Thank you very much! 🚀

@asterion
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment