aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/friendlytime.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/output/friendlytime.php')
-rw-r--r--views/default/output/friendlytime.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/views/default/output/friendlytime.php b/views/default/output/friendlytime.php
new file mode 100644
index 000000000..22f60d517
--- /dev/null
+++ b/views/default/output/friendlytime.php
@@ -0,0 +1,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 = htmlspecialchars(date(elgg_echo('friendlytime:date_format'), $vars['time']));
+
+echo "<acronym title=\"$timestamp\">$friendly_time</acronym>";