hamaluik / timecop

A time tracking app that respects your privacy and the gets the job done without being fancy.
https://timecop.app/
Apache License 2.0
823 stars 152 forks source link

WeekdayAverages are slightly skewed by extending the time period before calculating the daily average #102

Open maiers opened 1 year ago

maiers commented 1 year ago

Actual: It seems that WeekdayAverages a slightly off when viewed for a time period not aligned with the start/end of a week. Thus artificially decreasing the daily average for those days for which no data is available.

Expected: WeekdayAverages only normalizes daily hours worked by the number of instances of the given weekday within the actual time period monitored.

maiers commented 1 year ago

Example: if we generate a report from Monday past week until today (which is a Wednesday). We would expect that the daily average for Thursday is the actual number of hours worked last week on Thursday (divide by 1). But because the total is divided by the number of full weeks in the data set, we divide by 2.