Skip to content

Commit

Permalink
seboettg#159 "2nd" as en edition
Browse files Browse the repository at this point in the history
  • Loading branch information
glorieux-f committed Aug 3, 2023
1 parent 06ac76c commit 8242c4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Rendering/Number.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ public function render($data, $citationNumber = null): string
*/
public static function ordinal($num): string
{
if (!is_numeric($num)) {
return $num;
}
if ((int) ($num / 10) % 10 == 1) {
$ordinalSuffix = CiteProc::getContext()->getLocale()->filter('terms', 'ordinal')->single;
} elseif ($num % 10 == 1) {
Expand Down

0 comments on commit 8242c4c

Please sign in to comment.