aboutsummaryrefslogtreecommitdiff
path: root/mod/html5/views/default/output/friendlytime.php
blob: dc9699fba88d7f61dddd63b236a8753232dddcc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
/**
 * Friendly time
 * Translates an epoch time into a human-readable time.
 * 
 * @uses string $vars['time'] Unix-style epoch timestamp
 * @override views/default/output/friendlytime.php
 */

$friendly_time = elgg_get_friendly_time($vars['time']);
$timestamp = htmlentities(date(elgg_echo('friendlytime:date_format'), $vars['time']));
$datetime = htmlentities(date("c", $vars['time']));

echo "<time title=\"$timestamp\" datetime=\"$datetime\" class=\"timestamp\">$friendly_time</time>";