I curently have {$order[orders].invoice_date|date_format:"%d.%m.%Y"}
But how to add week + 1?
So, I need to add 1 week and then formating this.
But the date isn't in the timestap format.
Smarty version: 3.1.
I can use only smarty logic, not PHP.
How to achieve this?
You don't need a plugin to work this out. It can be solved with a combination of cat
and date_format
.
Since date_format
is a wrapper to PHPs strftime()
, you can use the conversion specifiers available in strftime()
- and that is what I used tackle the issue at hand.
Try this:
{$order[orders].invoice_date|cat:' +1 week'|date_format:"%d.%m.%Y"}
I've used Smarty version 3.1.17
to recreate your problem. The solution is based on the assumption that the value in your variable $order[orders].invoice_date
is a string 2015-01-20 03:52:19
.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments