Using one those values actually won't directly pass them to strtotime, as it might have imho unexpected results.
last week passed to
strtotime for example always returns the monday of the previous week. Instead I guess it would be expected to result in the day 7 days ago. Similar applies to last month and year.
For last month there are still some edge cases on the last day of a month when the previous month didn't have that much days.
last month on 31th Dezember would return 1st Dezember
Should these be usable in the API? If so, would it be good to have a system test or two for them?
Tested locally, works well, tested comparison + export links. Left one other test related comment, otherwise lgtm
Yes be great to document here if it's supported in the API https://developer.matomo.org/api-reference/reporting-api
@diosmosis it actually wasn't possible to use those as api params. at least the results were incorrect.
I've added a new commit to make that possible. It also fixes the usage when period=range.
Also added some system tests.