Thinking about it, it’s probably an Off-by-one error.
Hm, looks like an issue when the start day is Monday and not Sunday. I’ll take a look at this as soon as I have the time and release an update soon.
Thanks so much! I would really appreciate that!
Could not wait for ryan to fix this since this was really important.
got to fix it myself. edit plugin php file, find the following lines:
if(get_settings('start_of_week') != 1) {
for($i = 0; $i < $strt_day; $i++) {
$cal_output .= "
<td class=\"event-list-cal-blank\"> </td>\r";
$k++;
}
} else {
for($i = 1; $i < $strt_day; $i++) {
$cal_output .= "
<td class=\"event-list-cal-blank\"> </td>\r";
$k++;
}
}
Occurs three times in the code. In each place, put this instruction before the for loop in the else clause:
if ($strt_day < 1)
$strt_day = 7;
Worked for me, hope helps someone else. Ryan, please review and fix this.
Thanks for this fix. I confirm that this instruction have fixed the issue for me too.
I added the instruction if ($strt_day < 1) $strt_day = 7;
four times (not three times) in the code of the 1.7 release.
before the line 307
before the line 586
before the line 1560
before the line 1836
A more simple fix to solve this problem has been provided by visor69 :
To solve this problem you need to replace the line
$strt_day = date (‘w’, mktime (0, 0, 0, $ month, 1, $ year));
to
$strt_day = date (‘N’, mktime (0, 0, 0, $ month, 1, $ year));
See https://ww.wp.xz.cn/support/topic/incorrect-display-of-the-days-on-the-calendar
Replaced in four places.
Instead of the suggestions above, I found if I started the week with Sunday, the issue was resolved.
Starts the week on Monday:
if(get_settings('start_of_week') != 1) {
Start the week on Sunday:
if(get_settings('start_of_week') != 7) {
Found 8 times: lines 279, 300, 557, 579, 1531, 1552, 1808, and 1829
http://kctcspresident.com/
well, you can just “start the week on Sunday” by changing that in the main WordPress settings.
bdvllrd’s post above indeed provides an effective and easy fix!