mirror of
https://github.com/nushell/nushell.git
synced 2025-02-22 21:41:26 +01:00
Add datetime to math-like (#5118)
* Add datetime to math-like * add test
This commit is contained in:
parent
4409185e1b
commit
888369022f
@ -84,6 +84,10 @@ pub fn is_math_expression_like(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if parse_datetime(working_set, span).1.is_none() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if parse_binary(working_set, span).1.is_none() {
|
if parse_binary(working_set, span).1.is_none() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -411,3 +411,8 @@ fn unary_not_6() -> TestResult {
|
|||||||
"def",
|
"def",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn date_literal() -> TestResult {
|
||||||
|
run_test(r#"2022-09-10 | date to-record | get day"#, "10")
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user