We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bc69cc commit 26ff092Copy full SHA for 26ff092
src/utils/helpers.js
@@ -23,8 +23,8 @@ export const getMonthDates = (year = 2000) => {
23
export const getWeekdayDates = (firstDayOfWeek = 1, year = 2000) => {
24
const dates = [];
25
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) {
+ const d = new Date(Date.UTC(year, 0, i));
+ if (d.getUTCDay() === firstDayOfWeek - 1 || j > 0) {
28
dates.push(d);
29
j++;
30
}
0 commit comments