Activity Heatmap Off By One
Some related discussion: #19282 (moved), #5988 (closed)
Summary
Current the activity heatmap on the user profile page is showing the wrong day name for the date listed.
Steps to reproduce
Hover over a cell in the activity heatmap, for instance, today is Saturday July 16th, but my activity calendar says that it is Sunday July 16th
Expected behavior
You should see the right day name for the date.
Relevant logs and/or screenshots
Here on GitLab.com it shows that I have contributions on Sunday July 16th but July 16th is a Saturday:
Also, on GitLab.com it shows the legend on the right hand side ( m, w, f ) is off from the days:
Possible fixes
If you're intending to leave Sunday as the first day of the week for the Heatmap, you can fix it by changing line 5 in the datetime_utility.js.coffee
file making 'Sunday' the first day:
w.gl.utils.days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
If you're wanting to change the dates to start on Monday, then I believe some extra hacking on the calendar.js.coffee
file would be in order to ensure the correct dates were in the correct boxes.
Apologies if this issue is already slated to be resolved, I don't want to be intrusive.
Also, if you like, I can make a PR for it if you're wanting the weeks to begin with Sunday since I've already updated it locally.
Thanks for taking the time to read this issue :)
EDIT: after reading through more of the contributing guidelines I think it's ok that I submit a MR with this issue. I will link the MR number here shortly