Hey lovely people of GRAV,
I want to create a macro that compares two dates (now and when post was published) and returns the time that has passed since then !
Does someone have an idea ?
Hey lovely people of GRAV,
I want to create a macro that compares two dates (now and when post was published) and returns the time that has passed since then !
Does someone have an idea ?
The built-in |nicetime filter already does this for you although it returns the difference in a human readable style. If this is not what you want there are plenty of examples of this on google: https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=twig%20date%20compare
Log in to reply.
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 2287 | 9 years ago | ||
| 2 | 1500 | 9 years ago | ||
| 2 | 4750 | 9 years ago | ||
| 1 | 3565 | 9 years ago | ||
| 3 | 1625 | 9 years ago |