diff options
Diffstat (limited to 'views/default/output/date.php')
| -rw-r--r-- | views/default/output/date.php | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/views/default/output/date.php b/views/default/output/date.php index cbb6b8786..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
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @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 +<?php +/** + * Date + * Displays a properly formatted date + * + * @package Elgg + * @subpackage Core + * + * @uses $vars['value'] Date as text or a Unix timestamp in seconds + */ + +// convert timestamps to text for display +if (is_numeric($vars['value'])) { + $vars['value'] = gmdate('Y-m-d', $vars['value']); +} + +echo $vars['value']; |
