diff options
author | Christian Hesse <mail@eworm.de> | 2023-09-15 09:46:28 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-09-15 09:54:59 +0200 |
commit | 5349c9b52e48a1cc5245c8b76492cbbf2bd45ac4 (patch) | |
tree | 5210a00020da4dae19aba23ef55a8071cab937d7 /global-functions.rsc | |
parent | 2a10f43acc781359f05e59fc2305144f5027a31a (diff) |
global-functions: $EitherOr: properly handle time values
Diffstat (limited to 'global-functions.rsc')
-rw-r--r-- | global-functions.rsc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/global-functions.rsc b/global-functions.rsc index 55f8af6..3d35a8d 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -309,6 +309,9 @@ :if ([ :typeof $1 ] = "num") do={ :return [ $IfThenElse ($1 != 0) $1 $2 ]; } + :if ([ :typeof $1 ] = "time") do={ + :return [ $IfThenElse ($1 > 0s) $1 $2 ]; + } :return [ $IfThenElse ([ :len [ :tostr $1 ] ] > 0) $1 $2 ]; } |