From 5349c9b52e48a1cc5245c8b76492cbbf2bd45ac4 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 15 Sep 2023 09:46:28 +0200 Subject: global-functions: $EitherOr: properly handle time values --- global-functions.rsc | 3 +++ 1 file changed, 3 insertions(+) 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 ]; } -- cgit v1.2.3-54-g00ecf