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

$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>";