1 changed files with 10 additions and 0 deletions
@ -0,0 +1,10 @@ |
|||||
|
module TimeEntriesHelper |
||||
|
def formatted_duration(entry) |
||||
|
hours = entry.hours.to_i |
||||
|
minutes = entry.minutes.to_i |
||||
|
|
||||
|
return nil if hours == 0 && minutes == 0 |
||||
|
|
||||
|
format("%d:%02d", hours, minutes) |
||||
|
end |
||||
|
end |
||||
Loading…
Reference in new issue