|
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 |
gordonisnz Smarty Regular
Joined: 05 Sep 2009 Posts: 70
|
|
Back to top |
|
gordonisnz Smarty Regular
Joined: 05 Sep 2009 Posts: 70
|
Posted: Thu Jan 28, 2021 6:04 am Post subject: |
|
|
I've solved it in PHP - but would be good to know if possible in a template |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Jan 29, 2021 9:21 pm Post subject: |
|
|
Write a wrapper around DateTime class.
Code: | <?=(new DateTime("today next year"))->format("c");
|
|
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Fri Feb 12, 2021 8:04 pm Post subject: |
|
|
Try this:
Code: | {assign "woohoo" 'Y'|date:strtotime("next year")}
Test: {$woohoo} |
|
|
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
|