nebius/SWE-bench-extra huggingface dataset:
Repository: TRoboto/Maha

Issue:
Last day of month parsing returns incorrect date
### What happened?

Check the following example:

```py
>>> from datetime import datetime
>>> from maha.parsers.functions import parse_dimension
>>> date = datetime(2021, 9, 21)
>>> sample_text = "آخر اثنين من شهر شباط"
>>> parse_dimension(sample_text, time=True)[0].value + date
datetime.datetime(2021, 3, 15, 0, 0)
```

Obviously this is wrong, we're asking for February while it returns March.  The correct answer is:
```py
datetime.datetime(2021, 2, 22)
```


### Python version

3.8

### What operating system are you using?

Linux

### Code to reproduce the issue

_No response_

### Relevant log output

_No response_

Comments:

Patch:
diff --git a/maha/parsers/rules/time/values.py b/maha/parsers/rules/time/values.py
index 7c581a6..4a7d08e 100644
--- a/maha/parsers/rules/time/values.py
+++ b/maha/parsers/rules/time/values.py
@@ -729,13 +729,9 @@ _start_of_last_day = (
 LAST_SPECIFIC_DAY_OF_SPECIFIC_MONTH = FunctionValue(
     lambda match: parse_value(
         {
-            "month": _months.get_matched_expression(match.group("month")).value.month  # type: ignore
-            + 1
-            if _months.get_matched_expression(match.group("month")).value.month  # type: ignore
-            + 1
-            <= 12
-            else 1,
+            "month": _months.get_matched_expression(match.group("month")).value.month,  # type: ignore
             "weekday": _days.get_matched_expression(match.group("day")).value(-1),  # type: ignore
+            "day": 31,
         }
     ),
     spaced_patterns(_start_of_last_day, named_group("month", _months.join())),


Test patch:
diff --git a/tests/parsers/test_time.py b/tests/parsers/test_time.py
index 8fa926c..57182e3 100644
--- a/tests/parsers/test_time.py
+++ b/tests/parsers/test_time.py
@@ -726,6 +726,20 @@ def test_time(expected, input):
     assert_expression_output(output, expected)
 
 
+@pytest.mark.parametrize(
+    "expected,input",
+    [
+        (NOW.replace(day=30), "آخر خميس من شهر 9"),
+        (NOW.replace(day=29), "آخر اربعاء من شهر 9"),
+        (NOW.replace(day=22, month=2), "آخر اثنين من شهر شباط"),
+        (NOW.replace(day=28, month=2), "آخر احد من شهر شباط"),
+    ],
+)
+def test_last_specific_day_of_specific_month(expected, input):
+    output = parse_dimension(input, time=True)
+    assert_expression_output(output, expected)
+
+
 @pytest.mark.parametrize(
     "input",
     [