Simplify `ContributionsCalendar#starting_year` and `#starting_month`

This commit is contained in:
Robert Speicher 2016-01-01 22:11:34 -05:00
parent 4caf0433b7
commit 1a1113f7c4
1 changed files with 2 additions and 2 deletions

View File

@ -45,11 +45,11 @@ module Gitlab
end
def starting_year
(Time.now - 1.year).strftime("%Y")
1.year.ago.year
end
def starting_month
Date.today.strftime("%m").to_i
Date.today.month
end
end
end