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



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

def classname
  generate_classname("pb_date_kit", alignment)
end

#dayObject



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

def day
  pb_date_time.to_day
end

#day_of_weekObject



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

def day_of_week
  pb_date_time.to_day_of_week
end

#monthObject



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

def month
  pb_date_time.to_month.capitalize
end

#yearObject



41
42
43
# File 'app/pb_kits/playbook/pb_date/date.rb', line 41

def year
  pb_date_time.to_year
end