Skip to content

Commit

Permalink
Put in a reminder about the rules for english ordinals
Browse files Browse the repository at this point in the history
  • Loading branch information
tylert committed Dec 18, 2023
1 parent dc163a3 commit cd140a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func ordinal(num int, lang string) string {
switch lang {
case "en":
switch {
case num > 10 && num < 20:
case num > 10 && num < 14: // 11th, 12th, 13th
return fmt.Sprintf("%dth", num)
case num%10 == 1:
return fmt.Sprintf("%dst", num)
Expand Down

0 comments on commit cd140a8

Please sign in to comment.