aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/friendlytime.php
blob: 3618e7f567df88a379d6b125e1a3cbe578e84f86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<?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']));

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