• Resolved jodzeee

    (@jodzeee)


    I just upgraded and am playing around with it on my local dev site. I had the day of the week working, as per instructions, but I noticed the new version sets it back a day. But then I realized it’s just the heading that is wrong.

    For example, I want it on Sunday and even though it says, “Site Default (Sunday)”, the heading shows it’s starting on Saturday. But the date is right.

    So it’s showing today’s date as being Sunday, November 9.

    https://www.ads-software.com/plugins/google-calendar-events/

Viewing 15 replies - 1 through 15 (of 55 total)
  • Sam Lowry

    (@sam-lowry)

    Glad I am not the only one. I have this problem as well. I do like the upgrade though.

    jannybeanca

    (@jannybeanca)

    Me too! Super frustrating.

    jannybeanca

    (@jannybeanca)

    Just thought I would let you know that I completely removed the plugin and then re-installed it from scratch and the headings are working fine.

    Hope this helps.

    Thread Starter jodzeee

    (@jodzeee)

    Thanks. I’m testing it on a dev site so hoping it (and a few other quirks) can be fixed before I push it live.

    rebel.ga

    (@rebelga)

    Just completely removed the plugin and reloaded it. No change, weekdays are still off.

    jannybeanca

    (@jannybeanca)

    Did you upload the same one that you had? I actually downloaded the newest zip today. Maybe that is it?

    Thread Starter jodzeee

    (@jodzeee)

    Oh, I see what you’re saying. I mis-read it and thought you meant you went back to the old version. I’ll try to reinstall.

    Thread Starter jodzeee

    (@jodzeee)

    I tried to remove/reinstall but it didn’t change. To my surprise, I did get my old calendar back, but that wasn’t helpful since I rebuilt a new one.

    Next, I changed the settings to delete everything from the database when removing, removed, reinstalled, created a new calendar and it’s still the same.

    The headings are off and I can’t manage to go back any farther than June.

    jannybeanca

    (@jannybeanca)

    Did you test the OLD calendar. Cause mine came back too and that was the one I used that switched the headings back.

    Thread Starter jodzeee

    (@jodzeee)

    Well, it’s gone now, but I’m pretty sure I checked it and it wasn’t working, otherwise I’d have kept that one and been happy with it.

    jannybeanca

    (@jannybeanca)

    Sucky. I am not sure what else I did to make mine work. Maybe create an even NEW calendar with the fresh install?

    mfaulk

    (@mfaulk)

    edit**
    Scratch that… nothing was fixed from what I tried. Still a bugs out.

    rebel.ga

    (@rebelga)

    Still broke for me in 3.0.1.

    The Google calendar is set with Sunday as the first day. My WP General Settings make Sunday the first day. My Simple Calendar settings leave the setting to default (Sunday).

    The grid displays correctly, but the column headings are wrong with the first column listed as Saturday.

    This is not a converted calendar (I deleted those after 3.0.1 brought them back), but rather is a NEW calendar created (under 3.0.0 but now on 3.0.1).

    Seth Yoder

    (@mortimermcmire315)

    I found a way to fix it in the plugin’s PHP:

    In google-calendar-events/includes/functions/shared.php, find the function simcal_get_calendar_names_i18n. This should start around line 221 in the file. For me, line 237 has: $date->next( 6 );. Change this to: $date->next( 0 );.

    The week is clearly being set to start on Saturday here, and that’s the issue.

    I’ll post this in the other threads too.

    jannybeanca

    (@jannybeanca)

    Mine actually was broken again this morning. So I was able to fix it.

    I found this file in the plugin:
    google-calendar-events/vendor/nesbot/carbon/src/Carbon/Carbon.php

    And found this content:

    /**
    * The day constants
    */
    const SUNDAY = 0;
    const MONDAY = 1;
    const TUESDAY = 2;
    const WEDNESDAY = 3;
    const THURSDAY = 4;
    const FRIDAY = 5;
    const SATURDAY = 6;

    and switched it to

    /**
    * The day constants
    */
    const SUNDAY = 6;
    const MONDAY = 0;
    const TUESDAY = 1;
    const WEDNESDAY = 2;
    const THURSDAY = 3;
    const FRIDAY = 4;
    const SATURDAY = 5;

    and my headings work fine now in the widget. Not sure if this breaks anywhere else because that is the only place I use it.

    Hope this helps. And hopefully they fix it before the next update.

Viewing 15 replies - 1 through 15 (of 55 total)
  • The topic ‘Heading for day of week is off’ is closed to new replies.