From a04106ce1fd3ffc18c17187a2f5f9291ade6eb68 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 19 Jun 2024 13:59:52 +0100 Subject: [PATCH] Bug fix format_wikibase_time centuries --- matcher/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matcher/utils.py b/matcher/utils.py index dbe850f..55f3bd2 100644 --- a/matcher/utils.py +++ b/matcher/utils.py @@ -204,7 +204,7 @@ def format_wikibase_time(v: WikibaseTime) -> str | None: case 7: # century century = ((int(t[:5]) - 1) // 100) + 1 ordinal_num = num2words(abs(century), to="ordinal_num") - return f"{ordinal_num} {century}{' BC' if century < 0 else ''}" + return f"{ordinal_num} century{' BC' if century < 0 else ''}" case 6: # millennium millennium = ((int(t[:5]) - 1) // 1000) + 1 ordinal_num = num2words(abs(millennium), to="ordinal_num")