mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-28 02:41:37 +01:00
20 lines
493 B
PHP
20 lines
493 B
PHP
<?php
|
|
|
|
/*
|
|
* Smarty plugin
|
|
* -------------------------------------------------------------
|
|
* Type: modifier
|
|
* Name: date_format
|
|
* Purpose: format datestamps via strftime
|
|
* -------------------------------------------------------------
|
|
*/
|
|
require_once SMARTY_DIR . $this->plugins_dir . '/shared.make_timestamp.php';
|
|
function smarty_modifier_date_format($string, $format="%b %e, %Y")
|
|
{
|
|
return strftime($format, smarty_make_timestamp($string));
|
|
}
|
|
|
|
/* vim: set expandtab: */
|
|
|
|
?>
|