Bugfix - Allow {time, duration}::from::* to be parsed (#1886)

This commit is contained in:
Finn Bear 2023-04-29 12:57:10 -07:00 committed by GitHub
parent c295cb0509
commit 3f3b2248b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -384,7 +384,7 @@ fn function_duration(i: &str) -> IResult<&str, &str> {
tag("weeks"), tag("weeks"),
tag("years"), tag("years"),
preceded( preceded(
tag("from"), tag("from::"),
alt(( alt((
tag("days"), tag("days"),
tag("hours"), tag("hours"),
@ -554,7 +554,7 @@ fn function_time(i: &str) -> IResult<&str, &str> {
tag("week"), tag("week"),
tag("yday"), tag("yday"),
tag("year"), tag("year"),
preceded(tag("from"), alt((tag("micros"), tag("millis"), tag("secs"), tag("unix")))), preceded(tag("from::"), alt((tag("micros"), tag("millis"), tag("secs"), tag("unix")))),
))(i) ))(i)
} }