From b955c11b21ebb4f560c4f0f7a5968f010571256d Mon Sep 17 00:00:00 2001 From: Sitryk Date: Mon, 18 Sep 2017 11:40:39 +1200 Subject: [PATCH] 12nd doesn't sound like a number to me Kappa setting last was over complicated if _get_suffix received 11, 12, or 13 it would return st, nd, and rd respectively. We read it eleventh not elvenirst <3 --- imgwelcome/imgwelcome.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imgwelcome/imgwelcome.py b/imgwelcome/imgwelcome.py index 83e1545..23fbc2e 100644 --- a/imgwelcome/imgwelcome.py +++ b/imgwelcome/imgwelcome.py @@ -169,7 +169,9 @@ class ImgWelcome: def _get_suffix(self, num): num = str(num) - last = num[len(num)-1:len(num)] + last = num[-1)] + if num[-2] == "1": + return "th" if last == "1": return "st" elif last == "2":