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>
This commit is contained in:
Miika Turkia 2012-11-27 06:38:51 +02:00 committed by Dirk Hohndel
parent df3671390d
commit 2ee26caba4

View file

@ -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')"/>