Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statistic page shows repeated week "12/31/2018 - 1/7/2019" #6836

Closed
zhhyu opened this issue Jan 23, 2019 · 1 comment
Closed

Statistic page shows repeated week "12/31/2018 - 1/7/2019" #6836

zhhyu opened this issue Jan 23, 2019 · 1 comment

Comments

@zhhyu
Copy link
Contributor

zhhyu commented Jan 23, 2019

The statistic page in gallery shows repeated week "12/31/2018 - 1/7/2019", which is wrong. The graph of downloaded packages per week is not correct too.

image

@zhhyu zhhyu added this to the S147 - 2019.01.07 milestone Jan 23, 2019
@agr
Copy link
Contributor

agr commented Jan 23, 2019

This happens, because last day of the 2018 was Monday and it was 53rd week of the year. The sproc that produces the data for this report works like this:

  1. It figures out which day was 42 days ago;
  2. Checks which week was containing that day (so for 1/17/2019 it finds out that 42 days ago it was 49th week of 2018).
  3. It takes 6 weeks of data starting from that week (so, again, for 1/17/2019, it will grab data for weeks 49, 50, 51, 52, 53 and 1 (of 2019), regardless of the fact that 53 of 2018 and 1 of 2019 is the same week) and returns it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants