Sha256: e4c77cbee591bbd040822510457a06cf1faa492f8ab69499dc23b7bd174dd3bd
Contents?: true
Size: 505 Bytes
Versions: 12
Compression:
Stored size: 505 Bytes
Contents
module Coprl module Presenters module Helpers module Date LONG_FORMAT='%B %e, %Y' SHORT_FORMAT='%e %b' def format_date(date, format: LONG_FORMAT) date ? date.strftime(format) : '' end def format_date_long(time, format: nil) format_date(time, format: format||LONG_FORMAT) end def format_date_short(time, format: nil) format_date(time, format: format||SHORT_FORMAT) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems