forked from extern/nushell
Allow duration to be added to date (#14295)
# Description Fixes #14294 - Turned out to be a whole lot easier than I expected, but please double-check me on this, since it's an area I haven't been in before. # User-Facing Changes Allow date to be added to a duration type. # Tests + Formatting Tests added: * Duration + Date is allowed * Duration - Date is not allowed
This commit is contained in:
@ -88,6 +88,7 @@ pub fn math_result_type(
|
||||
(Type::Float, Type::Number) => (Type::Number, None),
|
||||
(Type::String, Type::String) => (Type::String, None),
|
||||
(Type::Date, Type::Duration) => (Type::Date, None),
|
||||
(Type::Duration, Type::Date) => (Type::Date, None),
|
||||
(Type::Duration, Type::Duration) => (Type::Duration, None),
|
||||
(Type::Filesize, Type::Filesize) => (Type::Filesize, None),
|
||||
|
||||
|
Reference in New Issue
Block a user