• Resolved webdev007

    (@nafidev)


    Hello Adam (and team)!

    Love the plugin. It looks great in my demo site, but I noticed the circle version of the countdown has a problem with days. When it’s more than 30, it will show a full circle. When it’s 30 it will begin to decrease. Regardless, the angle of the circle is incorrect — should be out of 365(ish) degrees.

    I searched and saw that there was a similar problem back in the 2.1.0 version, but curiously it was a circles that were correct that time.

    https://www.ads-software.com/support/topic/countdown-builder-2-1-0-wrong-day-calculation/

    My site isn’t live yet, but I can send you screenshots if that helps.

    Thank you,

    WebDev007

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter webdev007

    (@nafidev)

    Ps. I looked at the code for the circle counter, and I see where the issue is:

    The counters rely on the value of the adjacent units (“next units”). In my case, I only had days – hours – minutes – seconds. I did not have months enabled — it looks tidier that way, and it is the default for the plugin. I see that when I do enable months, the calculation can be run correctly, and the angles of the circles look right.

    Since I would prefer to not have months, having them visible isn’t a perfect solution. I believe the answer would involve having an ‘if’ case when months aren’t enabled.

    Hope that helps!

    WebDev007

    Plugin Author adamskaat

    (@adamskaat)

    Hi @nafidev,

    Thank you for connecting us.
    I checked on my side and when days are more than 30 days it’s full.
    Can you share a URL where I could see your issue in live?

    Thread Starter webdev007

    (@nafidev)

    Hey Adam — My site isn’t live yet, but it sounds like you’re able to reproduce the error if you’re seeing the same thing (ie, a full circle when there are fewer than 365 days left in the countdown).

    The expected behavior would be that, if there are 100 days remaining, it should be represented as 100/365 and thus be a little less than 1/3 full.

    A full circle in a countdown would represent a full year (365 days).

    • This reply was modified 1 year, 9 months ago by webdev007.
    • This reply was modified 1 year, 9 months ago by webdev007.
    Thread Starter webdev007

    (@nafidev)

    Update: I don’t know if this would make things simpler or not on your end, but an alternative could be that the calculation takes into consideration the start date (which is a field you do have in your plugin already).

    So the ratio would be:

    (remainder of days) / (total number of days between start date and due date)

    If there are 100 days until the event, I could set my start date to be 365 days in the past (full circle=365). Or, I could set the start date to be “today”, so the full circle = 100 days.

    This would also cover the use cases where someone might want to use the circle counter for an event that is more than a year in the future. Visually, that would make the most sense, I think!

    Plugin Author adamskaat

    (@adamskaat)

    Dear @nafidev,

    Our countdown days full circle is 31 day, it’s working like that and i dont think it’s a bug.

    Thread Starter webdev007

    (@nafidev)

    Should that be the case when months are turned off…?

    That would mean the circle will be full until the event is a month away.

    Plugin Author adamskaat

    (@adamskaat)

    Dear @nafidev.

    Days maximum value it’s 31 and that’s why 242 is fully 100%.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Countdown Builder 2.5.2 Wrong Day Calculation (Circles)’ is closed to new replies.