Sha256: 00ab715f9959309406ada61b9eb4365c4e966267556fd87dfe26d0172928d43a
Contents?: true
Size: 1016 Bytes
Versions: 143
Compression:
Stored size: 1016 Bytes
Contents
# frozen_string_literal: true module Playbook module PbDateRangeInline class DateRangeInline include ActionView::Helpers::TagHelper include ActionView::Context include Playbook::Props partial "pb_date_range_inline/date_range_inline" prop :end_date, type: Playbook::Props::Date, required: true prop :start_date, type: Playbook::Props::Date, required: true def classname generate_classname("pb_date_range_inline_kit") end def end_date_display date_time = Playbook::PbKit::PbDateTime.new(end_date) content_tag(:time, datetime: date_time.to_iso) do "#{date_time.to_day} #{date_time.to_month_downcase} #{date_time.to_year}" end end def start_date_display date_time = Playbook::PbKit::PbDateTime.new(start_date) content_tag(:time, datetime: date_time.to_iso) do "#{date_time.to_day} #{date_time.to_month_downcase} #{date_time.to_year}" end end end end end
Version data entries
143 entries across 143 versions & 1 rubygems