You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (j = year + 1; j >= year - off; --j)
for (i = 0, I = rules.length; i < I; i++)
if (rules[i].from <= j && j <= rules[i].to) actualized.push(actualize(entry, rules[i], j));
else if (rules[i].to < j && off == 1) off = j - rules[i].to;
actualized.sort(function (a, b) { return a.sort - b.sort });
for (i = 0, I = actualized.length; i < I; i++) {
if (time >= actualized[i][clock] && actualized[i][actualized[i].clock] > entry[actualized[i].clock]) found = actualized[i];
}
So if year = 2017, it seems like the FOR statement is iterating all the years from 2018, 2017, 2016 ... to 2005. May I know why you need to do this, can we only iterate rules for year 2017 in this case?
Thanks!
The text was updated successfully, but these errors were encountered:
Sorry for the delay. I can't remember why. I'll stare at the code this weekend and wait for it to come back to me or else apply your suggested optimization.
Heya, did you find a resolution here @bigeasy? This library looks like it would be immensely useful to me, but unfortunately the lack of API documentation has reeeeeally slowed me down.
Hi,
I have a question about the find function.
So if year = 2017, it seems like the FOR statement is iterating all the years from 2018, 2017, 2016 ... to 2005. May I know why you need to do this, can we only iterate rules for year 2017 in this case?
Thanks!
The text was updated successfully, but these errors were encountered: