aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/date.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/output/date.php')
-rw-r--r--views/default/output/date.php32
1 files changed, 14 insertions, 18 deletions
diff --git a/views/default/output/date.php b/views/default/output/date.php
index d4fba97a0..1644a3480 100644
--- a/views/default/output/date.php
+++ b/views/default/output/date.php
@@ -1,21 +1,17 @@
<?php
+/**
+ * Date
+ * Displays a properly formatted date
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] Date as text or a Unix timestamp in seconds
+ */
- /**
- * Date
- * Displays a properly formatted date
- *
- * @package Elgg
- * @subpackage Core
+// convert timestamps to text for display
+if (is_numeric($vars['value'])) {
+ $vars['value'] = gmdate('Y-m-d', $vars['value']);
+}
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @uses $vars['value'] A UNIX epoch timestamp
- *
- */
-
- if ($vars['value'] > 86400) {
- echo date("F j, Y",$vars['value']);
- }
-?> \ No newline at end of file
+echo $vars['value'];