summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2012-11-27 06:38:51 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-26 21:46:04 -0700
commit2ee26caba4adc5845c454eb07d6a4d4602778386 (patch)
treef28ad963729fafb7aaed6b6590c99bcb52741dcb /xslt
parentdf3671390d4b009525faf00926ca2a7b558a8ae6 (diff)
downloadsubsurface-2ee26caba4adc5845c454eb07d6a4d4602778386.tar.gz
JDiveLog import fallback for 1 digit numbers
Use the decimal time format fallback also for one digit numbers as Linus suggested. Thus 1.1 min would result in 1 min 6 sec. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/jdivelog2subsurface.xslt4
1 files changed, 2 insertions, 2 deletions
diff --git a/xslt/jdivelog2subsurface.xslt b/xslt/jdivelog2subsurface.xslt
index 74b6d0b99..52ced7424 100644
--- a/xslt/jdivelog2subsurface.xslt
+++ b/xslt/jdivelog2subsurface.xslt
@@ -349,8 +349,8 @@ Comment: <xsl:value-of select="Comment"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
- <xsl:when test="substring-after($timeSec, '.') >= 60">
- <xsl:value-of select="concat(substring-before($timeSec, '.'), ':', round(substring-after(format-number($timeSec, '.00'), '.') * .6), ' min')"/>
+ <xsl:when test="substring-after($timeSec, '.') &gt;= 60 or substring-after($timeSec, '.') &lt; 10">
+ <xsl:value-of select="concat(substring-before($timeSec, '.'), ':', format-number(round(substring-after(format-number($timeSec, '.00'), '.') * .6), '00'), ' min')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(substring-before($timeSec, '.'), ':', format-number(substring-after($timeSec, '.'), '00'), ' min')"/>