Update date filter to allow quoting values in single quotes

This commit is contained in:
Debanjum Singh Solanky
2023-07-07 17:13:47 -07:00
parent e588f7c528
commit 171ce19e1f
3 changed files with 11 additions and 11 deletions

View File

@@ -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}.

View File

@@ -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