Class: Playbook::PbDate::Date

Inherits:
Object
  • Object
show all
Includes:
ActionView::Context, ActionView::Helpers::TagHelper, Playbook::Props
Defined in:
app/pb_kits/playbook/pb_date/date.rb

Instance Method Summary collapse

Methods included from Playbook::Props

#dark_props, #generate_classname, #generate_classname_without_spacing, #initialize, #prop, #spacing_options, #spacing_props, #spacing_values

Instance Method Details

#classnameObject



22
23
24
# File 'app/pb_kits/playbook/pb_date/date.rb', line 22

def classname
  generate_classname("pb_date_kit", alignment)
end

#date_day_of_weekObject



26
27
28
# File 'app/pb_kits/playbook/pb_date/date.rb', line 26

def date_day_of_week
  pb_date_time.to_day_of_week
end

#dayObject



30
31
32
# File 'app/pb_kits/playbook/pb_date/date.rb', line 30

def day
  pb_date_time.to_day
end

#monthObject



34
35
36
# File 'app/pb_kits/playbook/pb_date/date.rb', line 34

def month
  pb_date_time.to_month.capitalize
end

#yearObject



38
39
40
# File 'app/pb_kits/playbook/pb_date/date.rb', line 38

def year
  pb_date_time.to_year
end