Module: Dates
Overview
Customers module to configure jekyll’s bundle per website
Instance Method Summary collapse
- #days_in_year(date = Date.today) ⇒ Object
- #sundays_in_year(date = Date.today) ⇒ Object
- #working_days_in_year ⇒ Object
Instance Method Details
#days_in_year(date = Date.today) ⇒ Object
9 10 11 |
# File 'lib/jekyll_theme_marketing/dates.rb', line 9 def days_in_year(date = Date.today) date.yday end |
#sundays_in_year(date = Date.today) ⇒ Object
13 14 15 |
# File 'lib/jekyll_theme_marketing/dates.rb', line 13 def sundays_in_year(date = Date.today) (first_day_of_year(date)..date).to_a.count(&:sunday?) end |
#working_days_in_year ⇒ Object
17 18 19 |
# File 'lib/jekyll_theme_marketing/dates.rb', line 17 def working_days_in_year days_in_year - sundays_in_year end |