Skip to content

Commit

Permalink
set start_date from 3 months ago for cluster date
Browse files Browse the repository at this point in the history
  • Loading branch information
beesaferoot committed Jan 22, 2025
1 parent 4f9d8e9 commit 28ed18d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public function __construct(

public function setData($dateRange = []) {
if (empty($dateRange)) {
$startDate = date('Y-01-01'); // first day of the year
// Set $startDate to 3 months ago
$startDate = date('Y-m-d', strtotime('-3 months'));
$endDate = date('Y-m-d H:i:s', strtotime('today'));
$dateRange[0] = $startDate;
$dateRange[1] = $endDate;
Expand Down

0 comments on commit 28ed18d

Please sign in to comment.