Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
3015a2e65234
Commit
1a1113f7
authored
Jan 01, 2016
by
Robert Speicher
Browse files
Simplify `ContributionsCalendar#starting_year` and `#starting_month`
parent
f072c1176731
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/gitlab/contributions_calendar.rb
View file @
3015a2e6
...
...
@@ -45,11 +45,11 @@ def events_by_date(date)
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment