diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-02-20 09:37:33 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-02-20 09:37:33 -0600 |
| commit | 9a1f4de323973fd475ac5603c974799b2e5fb6e8 (patch) | |
| tree | b5645af778dbcb725ef43aa0380c21d2eb84eb48 | |
| parent | 83493237a59e22a61edde0f4a80450592135b403 (diff) | |
| download | invidious-9a1f4de323973fd475ac5603c974799b2e5fb6e8.tar.gz invidious-9a1f4de323973fd475ac5603c974799b2e5fb6e8.tar.bz2 invidious-9a1f4de323973fd475ac5603c974799b2e5fb6e8.zip | |
Convert intervals to integers
| -rw-r--r-- | src/invidious/helpers/utils.cr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.cr index dcf162e2..f5838622 100644 --- a/src/invidious/helpers/utils.cr +++ b/src/invidious/helpers/utils.cr @@ -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 |
