summaryrefslogtreecommitdiff
path: root/app/helpers/datetime_helper.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-08-03 17:12:34 +0200
committererdgeist <erdgeist@erdgeist.org>2026-08-03 17:12:34 +0200
commit84657fa9d633a7d3e20c10645589061ecebeee3f (patch)
treef4bda793d90193db5002d0f2848dc441e9c65c11 /app/helpers/datetime_helper.rb
parenta74e40be88cd1331155c967656e393618e88cd27 (diff)
Render dates, booleans and counts through the locale files
Diffstat (limited to 'app/helpers/datetime_helper.rb')
-rw-r--r--app/helpers/datetime_helper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/datetime_helper.rb b/app/helpers/datetime_helper.rb
index 8497b1c0..ea6fd5c2 100644
--- a/app/helpers/datetime_helper.rb
+++ b/app/helpers/datetime_helper.rb
@@ -50,4 +50,13 @@ module DatetimeHelper
50 locale == :de ? "vor #{count} #{word}" : "#{count} #{word} ago" 50 locale == :de ? "vor #{count} #{word}" : "#{count} #{word} ago"
51 end 51 end
52 52
53 def admin_datetime(time)
54 return "" if time.blank?
55 I18n.l(time, :format => :ccc)
56 end
57
58 def admin_date(time)
59 return "" if time.blank?
60 I18n.l(time, :format => :ccc_date)
61 end
53end 62end