1: <?php
2: /**
3: * XOOPS year Smarty plug-in -- returns the current year
4: *
5: * @copyright XOOPS Project (http://xoops.org)
6: * @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
7: * @author Richard Griffith <richard@geekwright.com>
8: */
9:
10: /**
11: * Insert the current year
12: *
13: * @param $params
14: * @param $smarty
15: * @return null
16: */
17: function smarty_function_year($params, &$smarty)
18: {
19: $time = new DateTime();
20: echo $time->format('Y');
21: }
22: