Module: TimeCrisis::NamedMonths
Instance Method Summary collapse
- #april(year = nil) ⇒ Object
- #august(year = nil) ⇒ Object
- #december(year = nil) ⇒ Object
- #february(year = nil) ⇒ Object
- #january(year = nil) ⇒ Object
- #july(year = nil) ⇒ Object
- #june(year = nil) ⇒ Object
- #march(year = nil) ⇒ Object
- #may(year = nil) ⇒ Object
- #month_range(month = nil, year = nil) ⇒ Object
- #november(year = nil) ⇒ Object
- #october(year = nil) ⇒ Object
- #september(year = nil) ⇒ Object
Instance Method Details
permalink #april(year = nil) ⇒ Object
[View source]
15 16 17 |
# File 'lib/time_crisis/named_months.rb', line 15 def april(year=nil) month_range(4, year) end |
permalink #august(year = nil) ⇒ Object
[View source]
31 32 33 |
# File 'lib/time_crisis/named_months.rb', line 31 def august(year=nil) month_range(8, year) end |
permalink #december(year = nil) ⇒ Object
[View source]
47 48 49 |
# File 'lib/time_crisis/named_months.rb', line 47 def december(year=nil) month_range(12, year) end |
permalink #february(year = nil) ⇒ Object
[View source]
7 8 9 |
# File 'lib/time_crisis/named_months.rb', line 7 def february(year=nil) month_range(2, year) end |
permalink #january(year = nil) ⇒ Object
[View source]
3 4 5 |
# File 'lib/time_crisis/named_months.rb', line 3 def january(year=nil) month_range(1, year) end |
permalink #july(year = nil) ⇒ Object
[View source]
27 28 29 |
# File 'lib/time_crisis/named_months.rb', line 27 def july(year=nil) month_range(7, year) end |
permalink #june(year = nil) ⇒ Object
[View source]
23 24 25 |
# File 'lib/time_crisis/named_months.rb', line 23 def june(year=nil) month_range(6, year) end |
permalink #march(year = nil) ⇒ Object
[View source]
11 12 13 |
# File 'lib/time_crisis/named_months.rb', line 11 def march(year=nil) month_range(3, year) end |
permalink #may(year = nil) ⇒ Object
[View source]
19 20 21 |
# File 'lib/time_crisis/named_months.rb', line 19 def may(year=nil) month_range(5, year) end |
permalink #month_range(month = nil, year = nil) ⇒ Object
[View source]
51 52 53 54 55 56 57 |
# File 'lib/time_crisis/named_months.rb', line 51 def month_range(month=nil, year=nil) month ||= current.month year ||= current.year base = TimeCrisis::Date.civil(year, month, 1) base.for(1, 'months') end |
permalink #november(year = nil) ⇒ Object
[View source]
43 44 45 |
# File 'lib/time_crisis/named_months.rb', line 43 def november(year=nil) month_range(11, year) end |
permalink #october(year = nil) ⇒ Object
[View source]
39 40 41 |
# File 'lib/time_crisis/named_months.rb', line 39 def october(year=nil) month_range(10, year) end |
permalink #september(year = nil) ⇒ Object
[View source]
35 36 37 |
# File 'lib/time_crisis/named_months.rb', line 35 def september(year=nil) month_range(9, year) end |