Reports: the number of days selected by default is variable
-
Hello
Small bug in the default date selection on the report page: the default selection uses a variable number of days depending on the current date because the calculation of the start date uses date.setMonth(date.getMonth() – 1) .
–> if the selection extends over two months and the previous month is 31 days long, the selection will be 32 days long
–> if the selection extends over two months and the previous month is 30 days long, the selection will be 31 days long
—> if the selection extends over two months and the previous month is 28 days long, the selection will be 29 days long
etc.The global indicators (“total downloads” and “daily average downloads”) displayed by default are then calculated over a variable number of days depending on the day on which the page is presented.
I suggest using something like date.setDate(date.getDate() – 29) so that the default selection always contains 30 days.
- The topic ‘Reports: the number of days selected by default is variable’ is closed to new replies.