Skip to content

Commit c31adf3

Browse files
committed
fix: Fix date difference parameters order
1 parent 02707b3 commit c31adf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/Concerns/HandlesRecurrence.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function calculateNextRecurrenceEnd(Carbon|string $start = null): Carbon
1717
$start = Carbon::parse($start);
1818
}
1919

20-
$recurrences = PeriodicityType::getDateDifference(from: now(), to: $start, unit: $this->periodicity_type);
20+
$recurrences = PeriodicityType::getDateDifference(from: $start, to: now(), unit: $this->periodicity_type);
2121
$expirationDate = $start->copy()->add($this->periodicity_type, $this->periodicity + $recurrences);
2222

2323
return $expirationDate;

0 commit comments

Comments
 (0)