Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/aenea/date.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.today_in_pacific_tz ⇒ Object
11 12 13 |
# File 'lib/aenea/date.rb', line 11 def self.today_in_pacific_tz Time.now.in_pacific_tz.to_date end |
Instance Method Details
#beginning_of_month ⇒ Object
2 3 4 |
# File 'lib/aenea/date.rb', line 2 def beginning_of_month Date.new(self.year, self.month, 1) end |
#end_of_month ⇒ Object
6 7 8 9 |
# File 'lib/aenea/date.rb', line 6 def end_of_month next_month = self + 1.month Date.new(next_month.year, next_month.month, 1) - 1.day end |