diff --git a/lib/base.php b/lib/base.php index 4bc96ad88f67f358b40eb1beace9408a3a8f73df..a2401ecde2e0dab0e32773677b1f357d4c13bf82 100644 --- a/lib/base.php +++ b/lib/base.php @@ -232,10 +232,11 @@ class OC_UTIL { /** * formats a timestamp in the "right" way * - * @param timestamp $timestamp + * @param int timestamp $timestamp + * @param bool dateOnly option to ommit time from the result */ - public static function formatDate( $timestamp ){ - $timeformat='F j, Y, H:i'; + public static function formatDate( $timestamp,$dateOnly=false){ + $timeformat=$dateOnly?'F j, Y':'F j, Y, H:i'; return date($timeformat,$timestamp); }