From e11a98e6b805fc875c3a5eb4ddccc0517a566786 Mon Sep 17 00:00:00 2001 From: Florian Stascheck Date: Thu, 17 Feb 2022 10:12:36 +0000 Subject: [PATCH] Fixes #2549 Compare float to float, not float to int --- src/Carbon/Lang/en.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Carbon/Lang/en.php b/src/Carbon/Lang/en.php index a8633fef0e..f182900d06 100644 --- a/src/Carbon/Lang/en.php +++ b/src/Carbon/Lang/en.php @@ -72,7 +72,7 @@ $lastDigit = $number % 10; return $number.( - (~~($number % 100 / 10) === 1) ? 'th' : ( + (~~($number % 100 / 10) === 1.0) ? 'th' : ( ($lastDigit === 1) ? 'st' : ( ($lastDigit === 2) ? 'nd' : ( ($lastDigit === 3) ? 'rd' : 'th'