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 | 1349 | 9 years ago | ||
| 2 | 934 | 9 years ago | ||
| 2 | 4060 | 9 years ago | ||
| 1 | 2946 | 9 years ago | ||
| 3 | 1118 | 9 years ago |