Module: PlantWatchdog::Monthhelper
- Included in:
- UI::SinatraApp
- Defined in:
- lib/plantwatchdog/data.rb
Instance Method Summary collapse
Instance Method Details
#days_of_month(year, month) ⇒ Object
90 91 92 93 94 95 96 97 98 99 |
# File 'lib/plantwatchdog/data.rb', line 90 def days_of_month(year, month) t = Time.utc(year, month, 1, 12, 0, 0) result = [t] while (true) t += 3600*24 break if t.month != month result << t end return result end |