Skip to content

Commit 26ff092

Browse files
committed
Fix for weekday names
1 parent 5bc69cc commit 26ff092

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export const getMonthDates = (year = 2000) => {
2323
export const getWeekdayDates = (firstDayOfWeek = 1, year = 2000) => {
2424
const dates = [];
2525
for (let i = 1, j = 0; j < 7; i++) {
26-
const d = new Date(year, 0, i);
27-
if (d.getDay() === firstDayOfWeek - 1 || j > 0) {
26+
const d = new Date(Date.UTC(year, 0, i));
27+
if (d.getUTCDay() === firstDayOfWeek - 1 || j > 0) {
2828
dates.push(d);
2929
j++;
3030
}

0 commit comments

Comments
 (0)