Module: RIEL::DateExt::ClassMethods
- Defined in:
- lib/riel/date.rb
Instance Method Summary collapse
-
#days_in_month(year, month) ⇒ Object
Returns the number of days in the given month.
Instance Method Details
#days_in_month(year, month) ⇒ Object
Returns the number of days in the given month.
15 16 17 |
# File 'lib/riel/date.rb', line 15 def days_in_month year, month (Date.new(year, 12, 31) << (12 - month)).day end |