mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 05:40:17 +00:00
Update date filter to allow quoting values in single quotes
This commit is contained in:
@@ -102,7 +102,7 @@ A: You visited the Angkor Wat Temple in Cambodia with Pablo, Namita and Xi.
|
||||
|
||||
Q: What national parks did I go to last year?
|
||||
|
||||
["National park I visited in {last_new_year} dt>="{last_new_year_date}" dt<"{current_new_year_date}""]
|
||||
["National park I visited in {last_new_year} dt>='{last_new_year_date}' dt<'{current_new_year_date}'"]
|
||||
|
||||
A: You visited the Grand Canyon and Yellowstone National Park in {last_new_year}.
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class DateFilter(BaseFilter):
|
||||
# - dt>="yesterday" dt<"tomorrow"
|
||||
# - dt>="last week"
|
||||
# - dt:"2 years ago"
|
||||
date_regex = r"dt([:><=]{1,2})\"(.*?)\""
|
||||
date_regex = r"dt([:><=]{1,2})[\"'](.*?)[\"']"
|
||||
|
||||
def __init__(self, entry_key="raw"):
|
||||
self.entry_key = entry_key
|
||||
|
||||
Reference in New Issue
Block a user