|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
oppenhe1mer Smarty n00b
Joined: 07 Apr 2017 Posts: 1
|
Posted: Fri Apr 07, 2017 11:16 am Post subject: Add days (variable) to date |
|
|
Hey guys,
i looked up the forum and also google but didnt find a way that works.
Ive got two variables - one with a date and one just with a number - i just want to add the second variable to the date and after that format the whole thing.
To be more precisely:
$order->created (thats the date)
$order->estShipping (amount of days)
i know this doesnt work but i want sth like that:
{$order->created + $order->estShipping|date_format:"%Y-%m-%d"}
any ideas? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Apr 07, 2017 12:59 pm Post subject: |
|
|
You're adding business logic to the template. Don't do that.
Moreover, your "estShipping" must also be a date already. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|