You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
207 B
10 lines
207 B
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
|