mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 13:21:36 +01:00
Implemented plugin architecture.
This commit is contained in:
18
libs/plugins/modifier.date_format.php
Normal file
18
libs/plugins/modifier.date_format.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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: */
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user