From 5c9ff367e35e9ef3cdb670631f7411962dae1c69 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 25 Jan 2026 16:56:51 -0800 Subject: [PATCH] Fixhancement: change date calculation for 'this year' to include future documents (#11884) --- src/documents/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/documents/index.py b/src/documents/index.py index ea26ea926..8afc31fe9 100644 --- a/src/documents/index.py +++ b/src/documents/index.py @@ -602,7 +602,7 @@ def rewrite_natural_date_keywords(query_string: str) -> str: case "this year": start = datetime(local_now.year, 1, 1, 0, 0, 0, tzinfo=tz) - end = datetime.combine(today, time.max, tzinfo=tz) + end = datetime(local_now.year, 12, 31, 23, 59, 59, tzinfo=tz) case "previous week": days_since_monday = local_now.weekday()