Method: WeekOfMonth::Month#ending_of_month
- Defined in:
- lib/modules/month.rb
#ending_of_month ⇒ Date
returns date of last day of month for a given date. Date.new(2012,11,1).ending_of_month
=> #<Date: 2012-11-30 ((2456262j,0s,0n),+0s,2299161j)>
34 35 36 |
# File 'lib/modules/month.rb', line 34 def ending_of_month self.class.new(year, month, last_day_of_month) end |