From: Mischa POSLAWSKY Date: Mon, 22 Jun 2015 08:58:50 +0000 (+0200) Subject: sc: substitute 0 values by dash X-Git-Tag: v1.8~96 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/d65dbc45b208c486003f110d3d4072c08df7d58b?hp=711561e506ad48db7b5cbcf002ebaecd90558761 sc: substitute 0 values by dash --- diff --git a/sc.plp b/sc.plp index f134226..ec79a7c 100644 --- a/sc.plp +++ b/sc.plp @@ -115,7 +115,7 @@ sub showrange { my ($min, $max) = @_; return '' if not defined $min; $_ &&= int($_ + .5) for $min, $max; # round halves up - return $min if not defined $max or $min == $max; + return $min || '-' if not defined $max or $min == $max; return "$min-$max"; }