Relative date and time formats in dynamic content

Hey,

Is there currently an easy way to output relative date and time formats for post publish/modified dates with dynamic content?

What do you mean by relative? As in relative to the users timezone?
If you looking for relative names like Monday, see the following list. All dynamic values that can take a custom date format can use all the following in this table. See if it has what you want.
https://www.php.net/manual/en/datetime.format.php

{{dc:global:date format="l"}} // Says Monday on Monday
{{dc:post:publish_time format="l"}} // Using post publish date

I mean relative as in “posted today”, “posted 4 days ago”, “posted 1 year ago”, etc.

There is not a way through Dynamic Content, however WordPress offers a built in function we can utilize. I’ll write this down thanks, have a great weekend!

1 Like

Thanks @charlie, looking forward to it being included in dynamic content :+1:t2: