aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--global-functions.rsc3
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 ];
}