webdev007
Forum Replies Created
-
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.
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!
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).
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