parent
f6d090f250
commit
db9c99390e
|
@ -443,7 +443,8 @@ final class task extends core
|
||||||
$link->task['start'] instanceof datetime
|
$link->task['start'] instanceof datetime
|
||||||
&& $link->task['end'] instanceof datetime
|
&& $link->task['end'] instanceof datetime
|
||||||
) {
|
) {
|
||||||
$generated['hours'] = (float) $link->task['end']->diff($link->task['start'])->format('%H.%i');
|
$generated['hours'] = (float) $link->task['start']->diff($link->task['end'])->format('%R%H.%i');
|
||||||
|
if ($generated['hours'] < 0) $generated['hours'] += 24;
|
||||||
if ($generated['hours'] >= 6.5 && $generated['hours'] < 9) $generated['hours'] -= 0.5;
|
if ($generated['hours'] >= 6.5 && $generated['hours'] < 9) $generated['hours'] -= 0.5;
|
||||||
else if ($generated['hours'] >= 9 && $generated['hours'] < 12.5) $generated['hours'] -= 1;
|
else if ($generated['hours'] >= 9 && $generated['hours'] < 12.5) $generated['hours'] -= 1;
|
||||||
else if ($generated['hours'] >= 12.5) $generated['hours'] -= 1.5;
|
else if ($generated['hours'] >= 12.5) $generated['hours'] -= 1.5;
|
||||||
|
|
Reference in New Issue