Missing modifier
This commit is contained in:
parent
f4887d6666
commit
164a7ab020
29
onyx2/modules/templates/smarty/plugins/modifier.temps.php
Normal file
29
onyx2/modules/templates/smarty/plugins/modifier.temps.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Smarty plugin
|
||||
* @package Smarty
|
||||
* @subpackage plugins
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Smarty plugin
|
||||
*
|
||||
* Type: modifier<br>
|
||||
* Name: temps<br>
|
||||
* Date: Nov 15, 2020
|
||||
* Purpose: Affiche un temps à partir d'un nombre de seconde
|
||||
* Example: {$nombre_de_secondes|temps}
|
||||
* @version 1.0
|
||||
* @author Nigel
|
||||
* @param int
|
||||
* @return string
|
||||
*/
|
||||
function smarty_modifier_temps($secondes)
|
||||
{
|
||||
return gmdate("H:i:s", $secondes);
|
||||
}
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user