Source for file function.datetime.php
Documentation is available at function.datetime.php
* Zikula Application Framework
* @copyright (c) 2004, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: function.datetime.php 24342 2008-06-06 12:03:14Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_Template_Plugins
* Smarty function to display the current date and time
* <!--[datetime format="_DATEBRIEF"]-->
* <!--[datetime format='%b %d, %Y - %I:%M %p']-->
* _DATELONG '%A, %B %d, %Y'
* _DATESTRING '%A, %B %d @ %H:%M:%S'
* _DATETIMEBRIEF '%b %d, %Y - %I:%M %p'
* _DATETIMELONG '%A, %B %d, %Y - %I:%M %p'
* %a - abbreviated weekday name according to the current locale
* %A = full weekday name according to the current locale
* %b = abbreviated month name according to the current locale
* %B = full month name according to the current locale
* %d = day of the month as a decimal number (range 01 to 31)
* %y = year as a decimal number including the century
* %Y = year as a decimal number without a century (range 00 to 99)
* %H = hour as a decimal number using a 24-hour clock (range 00 to 23)
* %I = hour as a decimal number using a 12-hour clock (range 01 to 12)
* %M = minute as a decimal number
* %S = second as a decimal number
* %p = either 'am' or 'pm' according to the given time value, or the corresponding strings for the current locale
* ml_ftime function is defined in modules/NS-languages/api.php in PN 0.7x
* and in includes/pnLang.php line 450 in PN 0.8
* http://www.php.net/manual/en/function.strftime.php
* @author Mark West & Martin Andersen
* @see function.datetime.php::smarty_function_datetime()
* @param array $params All attributes passed to this function from the template
* @param object &$smarty Reference to the Smarty object
* @param string format Date and time format
* @return string current date and time
$format = '_DATETIMEBRIEF';
if (strpos($format, '%') !== false) { // allow the use of conversion specifiers
|