Defect #36897 » Format_hours.diff
lib/redmine/i18n.rb (working copy) | ||
---|---|---|
88 | 88 | |
89 | 89 |
if Setting.timespan_format == 'minutes' |
90 | 90 |
h = hours.floor |
91 |
m = ((hours - h) * 60).round |
|
91 |
_hrs, m = ((hours - h) * 60).round.divmod(60) |
|
92 |
h += _hrs |
|
92 | 93 |
"%d:%02d" % [ h, m ] |
93 | 94 |
else |
94 | 95 |
"%.2f" % hours.to_f |