SOURCES: eventum-timedisplay.patch (NEW) - improve time tracking o...
glen
glen at pld-linux.org
Fri May 12 19:02:53 CEST 2006
Author: glen Date: Fri May 12 17:02:53 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- improve time tracking output
---- Files affected:
SOURCES:
eventum-timedisplay.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/eventum-timedisplay.patch
diff -u /dev/null SOURCES/eventum-timedisplay.patch:1.1
--- /dev/null Fri May 12 19:02:53 2006
+++ SOURCES/eventum-timedisplay.patch Fri May 12 19:02:48 2006
@@ -0,0 +1,21 @@
+display 1h 20m instead of cryptic 1.8h
+also display total minutes in case omit_days is false, which is seen in weekly report
+
+--- eventum-1.7.1/include/class.misc.php 2006-05-12 20:00:39.939316085 +0300
++++ /home/glen/class.misc.php 2006-05-12 20:00:13.018713523 +0300
+@@ -472,13 +472,9 @@
+ if ((!empty($minutes)) && ($minutes < 6)) {
+ $return = sprintf("%02dm", $minutes);
+ } elseif ($hours > 24 && $omit_days == false) {
+- $mins = ($minutes % 60) / 60;
+- $days = $hours / 24;
+- $hours = $hours % 24;
+- $hours += $mins;
+- $return = sprintf("%02dd %.1fh", $days, $hours);
++ $return = sprintf("%dd %dh %dm (%dh %dm)", floor($minutes/24/60), floor($minutes/60)%24, $minutes%60, floor($minutes/60), $minutes%60);
+ } else {
+- $return = round($hours,1) . 'h';
++ $return = sprintf("%dh %dm", floor($minutes/60), $minutes%60);
+ }
+ if ($omit_empty) {
+ $chunks = explode(" ", $return);
================================================================
More information about the pld-cvs-commit
mailing list