summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2012-11-27 18:14:15 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-28 20:49:44 -0700
commit7259cf5bb64f7cf914c216c4c46cef5f416bb5a6 (patch)
treeb5348b3da52af31eb20da039c996d73a940d88fe
parent2ee26caba4adc5845c454eb07d6a4d4602778386 (diff)
downloadsubsurface-7259cf5bb64f7cf914c216c4c46cef5f416bb5a6.tar.gz
Count the actual decimal digits for import
Apply the decimal time conversion hack for JDiveLog import if there are less than 2 digits in the decimal part (and value is less than 60). Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--xslt/jdivelog2subsurface.xslt2
1 files changed, 1 insertions, 1 deletions
diff --git a/xslt/jdivelog2subsurface.xslt b/xslt/jdivelog2subsurface.xslt
index 52ced7424..d600c8077 100644
--- a/xslt/jdivelog2subsurface.xslt
+++ b/xslt/jdivelog2subsurface.xslt
@@ -349,7 +349,7 @@ Comment: <xsl:value-of select="Comment"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
- <xsl:when test="substring-after($timeSec, '.') &gt;= 60 or substring-after($timeSec, '.') &lt; 10">
+ <xsl:when test="substring-after($timeSec, '.') &gt;= 60 or string-length(substring-after($timeSec, '.')) &lt; 2">
<xsl:value-of select="concat(substring-before($timeSec, '.'), ':', format-number(round(substring-after(format-number($timeSec, '.00'), '.') * .6), '00'), ' min')"/>
</xsl:when>
<xsl:otherwise>