• Resolved nenesse8

    (@nenesse8)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Razvan Aldea

    (@raldea89)

    Thank you for the input. I’ve created an issue on Github where you can track the progress.

    Warmly,
    Razvan

    Miha

    (@mplusb)

    This topic will be marked as resolved due to inactivity and because we have an open ticket on GitHub regarding this. Please keep in mind that the ‘resolved’ status is only for this support thread, not the issue on GitHub.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Reports: the number of days selected by default is variable’ is closed to new replies.