diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2016-09-24 08:18:03 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-09-24 08:29:24 -0700 |
commit | 71273945c69b8c19f2ef298148d74ed70358c52e (patch) | |
tree | 8cd7555eb2cb58c1b14b6bd6b0f4a39cd48a80f7 /xslt/manualcsv2xml.xslt | |
parent | f4ca863a91d79e191a9cdf18cd29d41ec71b0971 (diff) | |
download | subsurface-71273945c69b8c19f2ef298148d74ed70358c52e.tar.gz |
Support h:m:s format for duration on CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/manualcsv2xml.xslt')
-rw-r--r-- | xslt/manualcsv2xml.xslt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xslt/manualcsv2xml.xslt b/xslt/manualcsv2xml.xslt index 287524d31..4e95d6fe6 100644 --- a/xslt/manualcsv2xml.xslt +++ b/xslt/manualcsv2xml.xslt @@ -183,7 +183,14 @@ <xsl:value-of select="$duration * 60"/> </xsl:when> <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:choose> </xsl:attribute> |