From 1372d8339d78c01b1514708f26520e244cc991e2 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sat, 16 Apr 2011 20:34:18 +0200 Subject: add a date format function for more eyecandy --- lib/base.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/base.php') diff --git a/lib/base.php b/lib/base.php index 93d6fb66c7e..8504518dbfb 100644 --- a/lib/base.php +++ b/lib/base.php @@ -222,6 +222,18 @@ class OC_UTIL { self::$styles[] = "$application/css/$file"; } + /** + * formats a timestamp in the "right" way + * + * @param timestamp $timestamp + */ + public static function formatDate( $timestamp ){ + $timeformat='F j, Y, H:i'; + return date($timeformat,$timestamp); + } + + + /** * check if the current server configuration is suitable for ownCloud * @return array arrays with error messages and hints -- cgit v1.2.3