mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
Add datetime to math-like (#5118)
* Add datetime to math-like * add test
This commit is contained in:
parent
4409185e1b
commit
888369022f
2 changed files with 9 additions and 0 deletions
|
@ -84,6 +84,10 @@ pub fn is_math_expression_like(
|
|||
return true;
|
||||
}
|
||||
|
||||
if parse_datetime(working_set, span).1.is_none() {
|
||||
return true;
|
||||
}
|
||||
|
||||
if parse_binary(working_set, span).1.is_none() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -411,3 +411,8 @@ fn unary_not_6() -> TestResult {
|
|||
"def",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn date_literal() -> TestResult {
|
||||
run_test(r#"2022-09-10 | date to-record | get day"#, "10")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue