mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
[statistics] fix: add missing last period to custom date ranges (#3661)
* fix: last node in previous data matches first node of current data * fix: add previous period support for custom periods * test: update to show previous period for custom range
This commit is contained in:
@@ -73,12 +73,15 @@ class CanRequestCustomTimedStatisticsTest extends TestCase
|
||||
'users' => [
|
||||
$timeStart->copy()->getTimestamp() => 1,
|
||||
$timeStart->copy()->subDays(1)->getTimestamp() => 1,
|
||||
$timeStart->copy()->subDays(2)->getTimestamp() => 1,
|
||||
], 'discussions' => [
|
||||
$timeStart->copy()->getTimestamp() => 1,
|
||||
$timeStart->copy()->subDays(1)->getTimestamp() => 2,
|
||||
$timeStart->copy()->subDays(2)->getTimestamp() => 1,
|
||||
], 'posts' => [
|
||||
$timeStart->copy()->getTimestamp() => 2,
|
||||
$timeStart->copy()->subDays(1)->getTimestamp() => 2,
|
||||
$timeStart->copy()->subDays(2)->getTimestamp() => 1,
|
||||
]
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user