-
Notifications
You must be signed in to change notification settings - Fork 0
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
Collect reviews as an input for index 'active' #1
base: github-statistics
Are you sure you want to change the base?
Collect reviews as an input for index 'active' #1
Conversation
Currently only commits are considered as an index of active, this patch includes other information such as comments and reviews...
|
||
my $date = DateTime->new(year => $year, month => $month, day => $day); | ||
my $desired_dow = 7; # Sunday | ||
$date->subtract(days => ($date->day_of_week - $desired_dow) % 7); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, isn't that equivalent to days => $date->day_of_week % 7
in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, what you suggested is more perl native ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I misunderstood you. But yes, that is equivalent to what you wrote...
Good catch on setting |
I'm wondering one thing, though... why not |
I guess the former one is adequate... |
As what the title said...
Currently only commits are considered as an index of active, this patch
includes other information such as comments and reviews...
Note: This patch is rather rough, feel free to improve/edit/or whatever necessary...
Also, I noticed the active index is calculated based on the weeks which have 'active data', not all 'natural ' weeks in a given date period, is it designed so?