Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- app/controllers/repositories_controller.rb
Instance Method Summary
Instance Method Details
- (Object) months_ago(date = Date.today)
302 303 304 |
# File 'app/controllers/repositories_controller.rb', line 302 def months_ago(date = Date.today) (date.year - self.year)*12 + (date.month - self.month) end |
- (Object) weeks_ago(date = Date.today)
306 307 308 |
# File 'app/controllers/repositories_controller.rb', line 306 def weeks_ago(date = Date.today) (date.year - self.year)*52 + (date.cweek - self.cweek) end |