Sha256: a2339fbb5cbf1229069a1dec0335f8b9811472ddf8a0b4fa24fb32e2f5123ba0
Contents?: true
Size: 629 Bytes
Versions: 66
Compression:
Stored size: 629 Bytes
Contents
class FestivityDatetimePresenter attr_reader :datetime def initialize(datetime) @datetime = datetime end def ==(other_object) @datetime == other_object.datetime end def display_as_date @datetime.strftime("%a, %B %-d") end def to_s @datetime.to_s end def to_date @datetime.to_date end def display_as_time_range "#{display_start_time} - #{display_end_time}" end def display_start_time @datetime.strftime(display_time_format) end def display_end_time (@datetime + 1.hour).strftime(display_time_format) end def display_time_format "%l:%M %P" end end
Version data entries
66 entries across 66 versions & 1 rubygems