PHP Classes

File: htdocs/class/smarty3_plugins/function.year.php

Recommend this page to a friend!
  Packages of Michael Beck   Xoops 2.5   htdocs/class/smarty3_plugins/function.year.php   Download  
File: htdocs/class/smarty3_plugins/function.year.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change:
Date: 3 months ago
Size: 461 bytes
 

Contents

Class file image Download
<?php
/**
 * XOOPS year Smarty plug-in -- returns the current year
 *
 * @copyright XOOPS Project (http://xoops.org)
 * @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
 * @author Richard Griffith <richard@geekwright.com>
 */

/**
 * Insert the current year
 *
 * @param $params
 * @param $smarty
 * @return null
 */
function smarty_function_year($params, &$smarty)
{
   
$time = new DateTime();
    echo
$time->format('Y');
}