Skip to content

Commit

Permalink
Make days diff negative when using Carbon v2 (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls authored Jun 7, 2024
1 parent 3e8639d commit 91e6773
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SslCertificate.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function expirationDate(): Carbon

public function lifespanInDays(): int
{
return $this->validFromDate()->diffInDays($this->expirationDate());
return $this->validFromDate()->diffInDays($this->expirationDate(), false);
}

public function isExpired(): bool
Expand Down Expand Up @@ -216,7 +216,7 @@ public function daysUntilExpirationDate(): int
{
$endDate = $this->expirationDate();

return (int) Carbon::now()->diffInDays($endDate);
return (int) Carbon::now()->diffInDays($endDate, false);
}

public function getDomains(): array
Expand Down

0 comments on commit 91e6773

Please sign in to comment.