mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Support hⓂ️s format for duration on CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f4ca863a91
commit
71273945c6
1 changed files with 8 additions and 1 deletions
|
@ -183,7 +183,14 @@
|
||||||
<xsl:value-of select="$duration * 60"/>
|
<xsl:value-of select="$duration * 60"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$duration"/>
|
<xsl:choose>
|
||||||
|
<xsl:when test="string-length(translate($duration, translate($duration, ':', ''), '')) = 2">
|
||||||
|
<xsl:value-of select="concat(substring-before($duration, ':') * 60 + substring-before(substring-after($duration, ':'), ':'), ':', substring-after(substring-after($duration, ':'), ':'))"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$duration"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
|
|
Loading…
Add table
Reference in a new issue