Add new analytic component "Estimated vs actual time per column"

This commit is contained in:
Patrick Kuijvenhoven
2021-02-22 05:22:45 +01:00
committed by GitHub
parent 6cadf82a63
commit a267aa368b
9 changed files with 151 additions and 1 deletions

View File

@@ -77,6 +77,18 @@ class DateHelper extends Base
return $dtF->diff($dtT)->format($format);
}
/**
* Get duration in hours into human format
*
* @access public
* @param float $hours
* @return string
*/
public function durationHours($hours)
{
return sprintf('%0.2f %s', round($hours, 2), t('hours'));
}
/**
* Get the age of an item in quasi human readable format.
* It's in this format: <1h , NNh, NNd