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
Support date format last week, last month, last year #13818
Comments
@fdellwing it's not a supported date format and while it works currently, it is not guaranteed it will work in the future. |
It is supported by strtotime() and that will not change, you even tell the people to look up the php.net article. Also it should be easy to fix, because you already have a date object, you just need to throw it into the datepicker. |
We still support only couple formats as there are places where we need to detect what kind of date format it is. It's not that easy to support it. I can't even guarantee the data it is showing is correct. Also when you say |
You are aware, of the fact, that "last week" is not a week (strtotime will always return a timestamp and not a range), but the day exactly one week ago? https://demo.matomo.org/index.php?module=MultiSites&action=index&idSite=3&period=day&date=last%20week |
Didn't know. It doesn't change too much though sorry. I can leave the issue open if you want and change the title to support this date format in the future. |
Thanks for creating this issue. We also got a customer report just today about this. And I'm wishing we have this feature once a month for a few months already :-) Use case: when doing manual reporting using Matomo numbers, the reporting process can include several links to Matomo reports for "Last month" (documented in a wiki page or spreadsheet.) Currently it is not possible with Matomo to put a static link that will always load last month's data. One can only put a link to a previous month's data and then has to click on it, and manually change date in calendar. in Matomo when you open a direct link to a report with date=last%20month you get error: in comparison this works well in Woocommerce reports which makes it much easier to report numbers in just a click: https://woocommerce/wp-admin/admin.php?page=wc-reports&tab=customers&range=last_month in my case for example I have more than 10 Matomo links that i'd like to open the "last month" data automatically. Would save valuable time and remove steps (having to change the date each time is tricky) when date= |
https://demo.matomo.org/index.php?module=MultiSites&action=index&idSite=3&period=day&date=last%20week
If you open this link, the datepicker is not present at all, but last week is working as intended.
On dashboard the datepicker is present.
The text was updated successfully, but these errors were encountered: