diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-07-28 08:18:39 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-28 09:56:30 -0700 |
commit | 28bd1fdcb595622a7b3eb3ebc1726d35c85790ff (patch) | |
tree | cae2023a36a36a7189f311d29b294163100d31ed /xslt/csv2xml.xslt | |
parent | 0b5fe99353f269538a884970229ff2689b839b0a (diff) | |
download | subsurface-28bd1fdcb595622a7b3eb3ebc1726d35c85790ff.tar.gz |
CSV import: add min:sec format support
On CSV import the time can be represented with seconds, min:sec or
hour:min:sec. This patch adds support for the min:sec format that was
missing.
See #662
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/csv2xml.xslt')
-rw-r--r-- | xslt/csv2xml.xslt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt index f2a11dae3..4d9aa868f 100644 --- a/xslt/csv2xml.xslt +++ b/xslt/csv2xml.xslt @@ -105,6 +105,11 @@ </xsl:with-param> </xsl:call-template> </xsl:when> + <xsl:when test="substring-after(substring-after($value, ':'), ':') = ''"> + <!-- We assume time format m:s --> + + <xsl:value-of select="substring-before($value, ':') * 60 + substring-after($value, ':')" /> + </xsl:when> <xsl:otherwise> <!-- We assume time format h:m:s --> |