mirror of
https://github.com/smarty-php/smarty.git
synced 2026-02-01 02:59:50 +01:00
19 lines
416 B
PHP
19 lines
416 B
PHP
<?php
|
|
|
|
/*
|
|
* Smarty plugin
|
|
* -------------------------------------------------------------
|
|
* Type: modifier
|
|
* Name: date_format
|
|
* Purpose: format datestamps via strftime
|
|
* -------------------------------------------------------------
|
|
*/
|
|
function smarty_modifier_date_format($string, $format="%b %e, %Y")
|
|
{
|
|
return strftime($format, smarty_make_timestamp($string));
|
|
}
|
|
|
|
/* vim: set expandtab: */
|
|
|
|
?>
|