From 4fe431034354041e3a72368a6d6384f88fee9da2 Mon Sep 17 00:00:00 2001 From: Matija Nalis Date: Mon, 15 Jul 2024 01:44:58 +0200 Subject: [PATCH] some clarification comments --- .../java/fr/free/nrw/commons/category/CategoriesModel.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/category/CategoriesModel.kt b/app/src/main/java/fr/free/nrw/commons/category/CategoriesModel.kt index 80732fa0c..08efe598d 100644 --- a/app/src/main/java/fr/free/nrw/commons/category/CategoriesModel.kt +++ b/app/src/main/java/fr/free/nrw/commons/category/CategoriesModel.kt @@ -51,10 +51,11 @@ class CategoriesModel @Inject constructor( } if (mentionsDecade) { - //Check if the year in the form of XX(X)0s is recent/relevant, i.e. in the 2000s or 2010s/2020s as stated in Issue #1029 + // Check if the year in the form of XX(X)0s is recent/relevant, i.e. in the 2000s or 2010s/2020s as stated in Issue #1029 + // Example: "2020s" is OK, but "1920s" is not (and should be skipped) return !recentDecade } else { - // If it is not an year in 20xxs form, then check if item contains a 4-digit word + // If it is not an year in decade form (e.g. 19xxs/20xxs), then check if item contains a 4-digit year // anywhere within the string (.* is wildcard) (Issue #47) // And that item does not equal the current year or previous year return item.matches(".*(19|20)\\d{2}.*".toRegex())