feat: more work on completing switchover

This commit is contained in:
2023-12-10 15:10:32 -06:00
parent 9a7aa89362
commit 5c133cba56
113 changed files with 19495 additions and 9336 deletions

View File

@@ -0,0 +1,27 @@
<?php
if (!function_exists('numberSuffix')) {
function numberSuffix($number) {
if (!is_int($number) || $number < 1) {
return $number;
}
$lastDigit = $number % 10;
$secondLastDigit = ($number / 10) % 10;
if ($secondLastDigit == 1) {
return 'th';
}
switch ($lastDigit) {
case 1:
return 'st';
case 2:
return 'nd';
case 3:
return 'rd';
default:
return 'th';
}
}
}