I am using the Dukt Twitter plugin and want to display the time since the tweet was created.
The Twitter API returns a string in the format:
Fri Sep 02 14:42:42 +0000 2016
I can use the date filter on this string to alter the format, but cannot pass this through the diff
method that twig exposes. I think I need to create a dateTime object, would this require a plugin to be created for this task or can I achieve this in twig?
A reference post on this forum discusses the diff
method: Get Age from Date of Birth - however I think I need to have a date object, not a string, to use it. Ideally I'd like to just achieve this in twig as I have never written a plugin before! Thanks