Function smarty_modifier_datetime
Smarty plugin to format a DateTime value
Examples: {$datevariable|datetime} - Oct 19, 2015, 9:43:12 PM ('medium' is default) {$datevariable|datetime:'elapse'} - 2 days ago {$datevariable|datetime:'Y'} - 2015
It is recommended to quote the format parameter
Package: modifier\datetime\php
Copyright: 2015 XOOPS Project (http://xoops.org)/
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Richard Griffith richard@geekwright.com
Located at oops_lib/smarty/xoops_plugins/modifier.datetime.php
Copyright: 2015 XOOPS Project (http://xoops.org)/
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Richard Griffith richard@geekwright.com
Located at oops_lib/smarty/xoops_plugins/modifier.datetime.php
DateTime|integer |
$datetime |
DateTime object, or unix timestamp |
string |
$format = 'medium' |
<p>format as defined in Locale::formatTimestamp(). Valid formats include: short, medium, long, full, custom, elapse, short-date, medium-date, long-date, full-date, short-time, medium-time, long-time, full-time, rss, and PHP date() format string</p> |
string
|
formatted representation of $datetime |