Class: TimeBoss::Calendars::Broadcast::Basis
Instance Attribute Summary
#month, #year
Instance Method Summary
collapse
#initialize, #to_range
Instance Method Details
#end_date ⇒ Object
26
27
28
29
30
31
|
# File 'lib/timeboss/calendars/broadcast.rb', line 26
def end_date
@_end_date ||= begin
date = Date.civil(year, month, -1)
date - date.wday
end
end
|
#start_date ⇒ Object
19
20
21
22
23
24
|
# File 'lib/timeboss/calendars/broadcast.rb', line 19
def start_date
@_start_date ||= begin
date = Date.civil(year, month, 1)
date - (date.wday + 6) % 7
end
end
|