From 1b1036c4299c93f693a7ca16c80e8b689745ef04 Mon Sep 17 00:00:00 2001 From: Kyle Date: Fri, 7 Jun 2024 12:22:45 +0200 Subject: [PATCH] Make days diff negative when using Carbon v2 --- src/SslCertificate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SslCertificate.php b/src/SslCertificate.php index 9679660..dcdf92c 100644 --- a/src/SslCertificate.php +++ b/src/SslCertificate.php @@ -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 @@ -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