diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-01-01 22:11:34 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-01-01 22:11:34 -0500 |
commit | 1a1113f7c4ad6e5bceb898593cba6caecbdf0097 (patch) | |
tree | 452968cab63d2b675a00ec57a8ec5ae42a95cc84 | |
parent | 4caf0433b7a06427c82eb1b2830d2c2dd830f144 (diff) | |
download | gitlab-ce-1a1113f7c4ad6e5bceb898593cba6caecbdf0097.tar.gz |
Simplify `ContributionsCalendar#starting_year` and `#starting_month`
-rw-r--r-- | lib/gitlab/contributions_calendar.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/contributions_calendar.rb b/lib/gitlab/contributions_calendar.rb index 8a7f8dc5003..85583dce9ee 100644 --- a/lib/gitlab/contributions_calendar.rb +++ b/lib/gitlab/contributions_calendar.rb @@ -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 |