diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 649f4280e..717007f54 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -628,7 +628,7 @@ update def graph_author_commits_per_month(repository) @date_to = Date.today @date_from = @date_to << 1 - @date_from = Date.civil(@date_from.year, @date_from.month, 1) + @date_from = Date.civil(@date_from.year, @date_from.month, @date_from.day) commits_by_author = Changeset.count(:all, :group => :committer, :conditions => ["#{Changeset.table_name}.repository_id = ? AND #{Changeset.table_name}.commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to]) commits_by_author = commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}.last(40) @@ -664,7 +664,7 @@ update def author_commits_six_month(repository) @date_to = Date.today @date_from = @date_to << 6 - @date_from = Date.civil(@date_from.year, @date_from.month, 1) + @date_from = Date.civil(@date_from.year, @date_from.month, @date_from.day) commits_by_author = Changeset.count(:all, :group => :committer, :conditions => ["#{Changeset.table_name}.repository_id = ? AND #{Changeset.table_name}.commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to]) commits_by_author = commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}.last(40)