i get date with: {$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}
But how get 20 day after?
If now: 2010 05 05 12:12:12
, I wish to show 2010 25 05 12:12:12
To display a date in your publications, you use the smarty. now function. This function calculates the number of seconds that have passed since 1-1-1970. The date_format modifier is then used to convert these seconds to a human readable value.
You can use strtotime() directly as a modifier.
{"+20 days"|strtotime|date_format:"Y/m/d"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With