aboutsummaryrefslogtreecommitdiff
path: root/src/fexpr
diff options
context:
space:
mode:
Diffstat (limited to 'src/fexpr')
-rw-r--r--src/fexpr/grammar.lalrpop4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fexpr/grammar.lalrpop b/src/fexpr/grammar.lalrpop
index c2df097..9584536 100644
--- a/src/fexpr/grammar.lalrpop
+++ b/src/fexpr/grammar.lalrpop
@@ -182,7 +182,7 @@ Date: DateTime<Utc> = {
}
Duration: Duration = {
- duration => Duration::seconds(<>[..<>.len() - 1].parse().unwrap()),
+ duration => Duration::from_std(humantime::parse_duration(<>).unwrap()).unwrap(),
}
CompOp: filters::values::CompOp = {
@@ -226,7 +226,7 @@ match {
r"\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d" => datetime,
r"\d\d\d\d-\d\d-\d\d" => date,
- r"\d+s" => duration,
+ r"((\d+m ?)?\d+s)|(\d+m)" => duration,
r"[[:alpha:]][\w]*" => word,
r#""[^"]*""# => string,