diff --git a/core/05-functions.php b/core/05-functions.php index f8c3d71..dcca0b9 100644 --- a/core/05-functions.php +++ b/core/05-functions.php @@ -567,11 +567,17 @@ if (!function_exists('getallheaders')) { /** * Renders a timestamp in HTML. * @package core - * @param int $timestamp The timestamp to render. + * @param int $timestamp The timestamp to render. + * @param boolean $absolute Whether the time should be displayed absolutely, or relative to the current time. + * @param boolean $html Whether the result should formatted as HTML (true) or plain text (false). * @return string HTML representing the given timestamp. */ -function render_timestamp($timestamp) { - return ""; +function render_timestamp($timestamp, $absolute = false, $html = true) { + $time_rendered = $absolute ? date("Y-m-d g:ia e", $timestamp) : human_time_since($timestamp); + if($html) + return ""; + else + return $time_rendered; } /** * Renders a page name in HTML.