X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2Fcommon.lib.php;h=d29ba1a121b2f96edb650e246380a738716a2e9c;hb=b027028b5322fcbfb6de53e7a74529cbac7931de;hp=43377103a294f0e7738dd01380b475c1721f2915;hpb=60a7d2b7a9ba3f15874c359c0cba2ca97ff9eca8;p=timetracker.git diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 43377103..d29ba1a1 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -390,3 +390,11 @@ function ttStartsWith($string, $startString) $len = strlen($startString); return (substr($string, 0, $len) === $startString); } + +// ttDateToUserFormat converts a date from database format to user format. +function ttDateToUserFormat($date) +{ + global $user; + $o_date = new DateAndTime(DB_DATEFORMAT, $date); + return $o_date->toString($user->date_format); +}