Sha256: c71301e24983d53b778ffec1098a48605980306e98c51bd4395d68f192312293
Contents?: true
Size: 447 Bytes
Versions: 79
Compression:
Stored size: 447 Bytes
Contents
module Tenon class EventDecorator < ApplicationDecorator def display_date if @object.starts_at.to_date == @object.ends_at.to_date "#{@object.starts_at.strftime('%B %d, %Y')} from #{@object.starts_at.strftime('%I:%M%p')} until #{@object.ends_at.strftime('%I:%M%p')}" else "#{@object.starts_at.strftime("%B %d, %Y at %I:%M%p")} until #{@object.ends_at.strftime("%B %d, %Y at %I:%M%p")}" end end end end
Version data entries
79 entries across 79 versions & 1 rubygems