fix: _parse_dt does not understand 'tonight' so event start/end breaks (#1488)

This commit is contained in:
Afonso Coutinho
2026-06-03 06:14:41 +01:00
committed by GitHub
parent eb5727abda
commit 96d59d2ff9
2 changed files with 28 additions and 2 deletions
+2 -2
View File
@@ -338,8 +338,8 @@ def _parse_dt(s: str) -> datetime:
return None
return h, mn
# today/tomorrow/yesterday [at] TIME
m = _re.match(r'^(today|tomorrow|tmrw|yesterday)(?:\s+at)?\s*(.*)$', lower)
# today/tonight/tomorrow/yesterday [at] TIME
m = _re.match(r'^(today|tonight|tomorrow|tmrw|yesterday)(?:\s+at)?\s*(.*)$', lower)
if m:
word, rest = m.group(1), m.group(2).strip()
base = today