Remove Danbooru Winter Sale.

This commit is contained in:
evazion
2021-01-01 04:11:49 -06:00
parent 5b7894a8b2
commit 1d15ce2bcd
11 changed files with 3 additions and 61 deletions

View File

@@ -108,17 +108,13 @@ module ApplicationHelper
tag.time content || datetime, datetime: datetime, title: time.to_formatted_s, **options
end
def humanized_duration(from, to, compact: false)
def humanized_duration(from, to)
if to - from > 10.years
duration = "forever"
else
duration = distance_of_time_in_words(from, to)
end
if compact
duration = duration.gsub(/almost|about|over/, "").gsub(/less than a/, "<1").strip
end
datetime = from.iso8601 + "/" + to.iso8601
title = "#{from.strftime("%Y-%m-%d %H:%M")} to #{to.strftime("%Y-%m-%d %H:%M")}"