Skip to content

Commit

Permalink
correctly calculate for 1 years, and properly use 12 months
Browse files Browse the repository at this point in the history
  • Loading branch information
blind-coder committed Oct 25, 2022
1 parent 04ba189 commit e085d48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/buildConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ export default (config) => {
// override points per hour to mach group_by function
switch (conf.group_by) {
case 'year':
conf.points_per_hour = 1 / (24 * 7 * 365);
conf.points_per_hour = 1 / (24 * 365);
break;
case 'month':
conf.points_per_hour = 1 / (24 * 7 * 4); // cheating a bit, this is actually 4 weeks
conf.points_per_hour = 1 / (24 * 365 / 12);
break;
case 'week':
conf.points_per_hour = 1 / (24 * 7);
Expand Down

0 comments on commit e085d48

Please sign in to comment.