]> git.pld-linux.org Git - packages/eventum.git/blame - eventum-timedisplay.patch
- memory limit patches merged
[packages/eventum.git] / eventum-timedisplay.patch
CommitLineData
821b0179
ER
1display 1h 20m instead of cryptic 1.8h
2also display total minutes in case omit_days is false, which is seen in weekly report
3
4--- eventum-1.7.1/include/class.misc.php 2006-05-12 20:00:39.939316085 +0300
5+++ /home/glen/class.misc.php 2006-05-12 20:00:13.018713523 +0300
6@@ -472,13 +472,9 @@
7 if ((!empty($minutes)) && ($minutes < 6)) {
8 $return = sprintf("%02dm", $minutes);
9 } elseif ($hours > 24 && $omit_days == false) {
10- $mins = ($minutes % 60) / 60;
11- $days = $hours / 24;
12- $hours = $hours % 24;
13- $hours += $mins;
14- $return = sprintf("%02dd %.1fh", $days, $hours);
15+ $return = sprintf("%dd %dh %dm (%dh %dm)", floor($minutes/24/60), floor($minutes/60)%24, $minutes%60, floor($minutes/60), $minutes%60);
16 } else {
17- $return = round($hours,1) . 'h';
18+ $return = sprintf("%dh %dm", floor($minutes/60), $minutes%60);
19 }
20 if ($omit_empty) {
21 $chunks = explode(" ", $return);
This page took 0.071133 seconds and 4 git commands to generate.