Skip to content

Commit

Permalink
Merge pull request #111 from EricMcRay/fix-weekdays
Browse files Browse the repository at this point in the history
Fix wrong weekdays name #110
  • Loading branch information
Nathan Reyes authored Mar 30, 2018
2 parents 448b16c + 26ff092 commit 03790b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const getMonthDates = (year = 2000) => {
export const getWeekdayDates = (firstDayOfWeek = 1, year = 2000) => {
const dates = [];
for (let i = 1, j = 0; j < 7; i++) {
const d = new Date(year, 0, i);
if (d.getDay() === firstDayOfWeek - 1 || j > 0) {
const d = new Date(Date.UTC(year, 0, i));
if (d.getUTCDay() === firstDayOfWeek - 1 || j > 0) {
dates.push(d);
j++;
}
Expand Down

0 comments on commit 03790b6

Please sign in to comment.