@fdellwing opened this Issue on December 10th 2018 Contributor

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.

@tsteur commented on December 10th 2018 Member

@fdellwing it's not a supported date format and while it works currently, it is not guaranteed it will work in the future.

@fdellwing commented on December 10th 2018 Contributor

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.

@tsteur commented on December 10th 2018 Member

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 last week the period would need to be range as multiple dates are not supported by the UI with a non-range period.

@fdellwing commented on December 10th 2018 Contributor

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
https://demo.matomo.org/index.php?module=MultiSites&action=index&idSite=3&period=day&date=2018-12-03

@tsteur commented on December 10th 2018 Member

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.

Powered by GitHub Issue Mirror