Is 7-Day and 30-Day Performance Broken?

The 7-day and 30-day performance numbers seem to be broken on the standings page in all of my leagues. See league 853 as an example (Ottoneu Fantasy Baseball - standings - Fly-Ball Revolutionaries). Both 7-day and 30-day are reporting the same number and the 30-day is different from the current standings. Not a critical issue, but I do like to use this feature–now that we are moving past day 7 in the season. Thanks!

FWIW this is working fine for me.

…although now I see what you mean with the “and the 30-day is different from the current standings”.

I’ll take a closer look at this tonight.

And by tonight I mean this weekend :slight_smile:

Ha. Like I said, it is not critical. And yes, the 7-day and 30-day are now different values but the 30 should be the same as the season total at this point. Thanks for taking a look.

Ok I’m going to write this out because its a pretty goofy one and pertains to … time? I guess? I don’t know.

When the site figures out what “30 days ago” or “7 days ago” is, it bounds on the start and end of the season. So 30 days ago will really end up being Opening Day, not March 11 or whatever. As of when this was first posted, I believe 7 days ago would have ended up being Opening Day as well, though now these numbers are (correctly) no longer aligned, since 7 days ago is not Opening Day and 30 days ago is.

As far as 30 days ago not aligning with total points, the site calculates the delta by seeing current score and subtracting the score from 1/7/30 days ago. When finding the score 30 days ago from today, the site gets the point total at the end of Opening Day, not the 0 from the start of Opening Day - each team has one point total for each date, calculated at the end of the date if the date is in the past. So 30 day performance does not include Opening Day if we’re less than 30 days into the season.

Once we get more than 30 days into the season, this behavior makes sense. However right now it is confusing and bug-like. I’ll need to think a bit more about how to make 30-day performance and 7-day performance make a little bit more sense at the beginning of the season.

That makes perfect sense in terms of what the results actually mean. Thanks for the clarification. The 7-day performance and 30-day performance are not really helpful until after seven or 30 days pass so the fact that the reported values do not catch up until after seven and 30 days does not really matter all that much. Thanks again.

1 Like

I’m no expert programmer, but perhaps you just need an IF/ELSE sort of approach, like “if today minus opening day is less than 7 (or 30), then use total, else use current calculation.”

There’s a special case that needs to be written for opening day, definitely. The problem is that special cases are dangerous and are generally to be avoided…

1 Like