[PATCH] JDiveLog import fallback for 1 digit numbers
Miika Turkia
miika.turkia at gmail.com
Mon Nov 26 20:38:51 PST 2012
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 at gmail.com>
---
xslt/jdivelog2subsurface.xslt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xslt/jdivelog2subsurface.xslt b/xslt/jdivelog2subsurface.xslt
index 4e3d5a4..d8a850b 100644
--- a/xslt/jdivelog2subsurface.xslt
+++ b/xslt/jdivelog2subsurface.xslt
@@ -387,8 +387,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, '.') >= 60 or substring-after($timeSec, '.') < 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')"/>
--
1.7.9.5
More information about the subsurface
mailing list