New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Is there any in_x_days modifier?

Max Glass May 11, 2020 by Max Glass

Hi there,

is there any possibility to display a date in a "in ... days" format? E.g. let's assume today is the 15th of July and you have saved the 20th of July. Can one display "in 5 days" then? Or can it be done by some combination of other modifiers/variables? I already tried many options including unix formatted timestamps:

{{ announcement_date | -:now:format:U }} (announcement_date is saved in U-format)
Answered by Erin Dalzell!
>>>>>>> Answered <<<<<<<
1 Reply