Skip to content

Instantly share code, notes, and snippets.

Gordon Broom gjbroom

View GitHub Profile
@gjbroom
gjbroom / gist:9a1f296a743030796987
Created Oct 19, 2012
XSL to transform Unity Pro date stamps in .XEF file to ISO8601 format
View gist:9a1f296a743030796987
<!-- Fun fun! Parse Unity Pro date stamp and normalize to ISO8601. Add leading zeros to fields if they aren't there. -->
<xsl:variable name="fullTs"><xsl:value-of select="substring-after(/FEFExchangeFile/fileHeader/@dateTime, 'date_and_time#')"/></xsl:variable>
<xsl:variable name="year"><xsl:value-of select="substring-before($fullTs, '-')" /></xsl:variable>
<xsl:variable name="month"><xsl:value-of select="substring-before(substring-after($fullTs, '-'), '-')"></xsl:value-of></xsl:variable>
<xsl:variable name="day"><xsl:value-of select="substring-before(substring-after(substring-after($fullTs, '-'), '-'), '-')"/></xsl:variable>
<xsl:variable name="hour"><xsl:value-of select="substring-before(substring-after(substring-after(substring-after($fullTs, '-'), '-'), '-'), ':')"/></xsl:variable>
<xsl:variable name="minute"><xsl:value-of select="substring-before(substring-after(substring-after(substring-after(substring-after($fullTs, '-'), '-'), '-'), ':'), ':')"/></xsl:variable>
<xsl:variable name="second"><xsl:value-
You can’t perform that action at this time.