diff options
author | Etienne Massip <etienne.massip@gmail.com> | 2012-01-07 19:02:10 +0000 |
---|---|---|
committer | Etienne Massip <etienne.massip@gmail.com> | 2012-01-07 19:02:10 +0000 |
commit | 59789c799761bfd928d0a4d7d1d1e492951fe55a (patch) | |
tree | d9318af1158d1145a0ed8176df311e1e57e347cb /app | |
parent | 165373575883c3ca377d0d9d5ee0780cd0b09b24 (diff) | |
download | redmine-59789c799761bfd928d0a4d7d1d1e492951fe55a.tar.gz redmine-59789c799761bfd928d0a4d7d1d1e492951fe55a.zip |
Moved Date months/weeks calculations used in Graph to lib.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8540 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/repositories_controller.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 98739a60c..ad7d2df36 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -1,5 +1,5 @@ # Redmine - project management software -# Copyright (C) 2006-2011 Jean-Philippe Lang +# Copyright (C) 2006-2012 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -366,12 +366,3 @@ class RepositoriesController < ApplicationController end end -class Date - def months_ago(date = Date.today) - (date.year - self.year)*12 + (date.month - self.month) - end - - def weeks_ago(date = Date.today) - (date.year - self.year)*52 + (date.cweek - self.cweek) - end -end |