mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Convert intervals to integers
This commit is contained in:
parent
83493237a5
commit
9a1f4de323
1 changed files with 4 additions and 4 deletions
|
@ -146,13 +146,13 @@ def recode_date(time : Time, locale)
|
|||
elsif span.total_days > 7.0
|
||||
span = translate(locale, "`x` weeks", (span.total_days.to_i / 7).to_s)
|
||||
elsif span.total_hours > 24.0
|
||||
span = translate(locale, "`x` days", (span.total_days).to_s)
|
||||
span = translate(locale, "`x` days", (span.total_days.to_i).to_s)
|
||||
elsif span.total_minutes > 60.0
|
||||
span = translate(locale, "`x` hours", (span.total_hours).to_s)
|
||||
span = translate(locale, "`x` hours", (span.total_hours.to_i).to_s)
|
||||
elsif span.total_seconds > 60.0
|
||||
span = translate(locale, "`x` minutes", (span.total_minutes).to_s)
|
||||
span = translate(locale, "`x` minutes", (span.total_minutes.to_i).to_s)
|
||||
else
|
||||
span = translate(locale, "`x` seconds", (span.total_seconds).to_s)
|
||||
span = translate(locale, "`x` seconds", (span.total_seconds.to_i).to_s)
|
||||
end
|
||||
|
||||
return span
|
||||
|
|
Loading…
Reference in a new issue