yyyy-MM-dd
and time hh:mm:ss.SS
, but the following deviations from the standard took place:
T
;date:difference
, but I had to give it up. The fact is that the difference was required to receive with an accuracy of milliseconds, and this algorithm returned a valid xsd:duration
(ISO 8601), which does not contain milliseconds. In addition, parsing someone else's output, although formalized - is not very grateful. Thus, having rummaged a bit in exslt, I decided to write the parser myself, in the hope that I can do it quickly ...
< xsl:stylesheet/ >
appropriate:
<? xml version ="1.0" encoding ="utf-8" ? > < xsl:stylesheet version ="1.0" xmlns:date ="date" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes ="date"> <!-- Source code goes here --> </ xsl:stylesheet >
<? xml version ="1.0" encoding ="utf-8" ? > < xsl:stylesheet version ="1.0" xmlns:date ="date" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes ="date"> <!-- Source code goes here --> </ xsl:stylesheet >
<? xml version ="1.0" encoding ="utf-8" ? > < xsl:stylesheet version ="1.0" xmlns:date ="date" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes ="date"> <!-- Source code goes here --> </ xsl:stylesheet >
<? xml version ="1.0" encoding ="utf-8" ? > < xsl:stylesheet version ="1.0" xmlns:date ="date" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes ="date"> <!-- Source code goes here --> </ xsl:stylesheet >
<? xml version ="1.0" encoding ="utf-8" ? > < xsl:stylesheet version ="1.0" xmlns:date ="date" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes ="date"> <!-- Source code goes here --> </ xsl:stylesheet >
<? xml version ="1.0" encoding ="utf-8" ? > < xsl:stylesheet version ="1.0" xmlns:date ="date" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes ="date"> <!-- Source code goes here --> </ xsl:stylesheet >
<? xml version ="1.0" encoding ="utf-8" ? > < xsl:stylesheet version ="1.0" xmlns:date ="date" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes ="date"> <!-- Source code goes here --> </ xsl:stylesheet >
extension-element-prefixes
will be used by templates, and the XML namespace date:*
will be used only once for the declaration of the following container:
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< date:month > < january > 31 </ january > < february > 28 </ february > < march > 31 </ march > < april > 30 </ april > < may > 31 </ may > < june > 30 </ june > < july > 31 </ july > < august > 31 </ august > < september > 30 </ september > < october > 31 </ october > < november > 30 </ november > < december > 31 </ december > </ date:month >
< xsl:variable name ="date:month"
select ="document('')//date:month"/>
sum($date:month/*[$i>=position()])+($i>2)
- the total number of leap year days for the $i
th month inclusive.
NaN
and, in the case of a positive comparison, replace them with 0
. This would generate a set of < xsl:if />
which heavily cluttered the code. Therefore, I began to use a translate
like this:
translate($expression,'NaN',0)
< xsl:decimal-format NaN ="0"/>
format-number
function does not know how to work with three arguments and produces unknown error, which makes it impossible to use named decimal-format
number formats like this:
< xsl:decimal-format name ="date:NaN" NaN ="0">
< xsl:decimal-format name ="date:NaN" NaN ="0">
format-number($expression,0,'date:NaN')
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
< xsl:template name ="date:timestamp" > < xsl:param name ="date-time" /> < xsl:variable name ="compact" select =" normalize-space( translate($date-time,'TZ ',''))" /> < xsl:variable name ="year" select =" translate( substring($compact,1, 4+(starts-with($compact,'+') or starts-with($compact,'-'))), '+','')"/> < xsl:variable name ="date" select ="substring-after($compact,$year)" /> < xsl:variable name ="time" select ="substring($date,7)" /> < xsl:variable name ="month" select ="format-number(substring($date,2,2)-1,0)" /> < xsl:variable name ="utc-offset" > < xsl:variable name ="raw" select =" concat( substring-after($time,'+'), substring-after($time,'-'))"/> < xsl:variable select =" format-number( (contains($time,'-')-.5) *2*(substring($raw,1,2)*60 +substring($raw,4,2)),0)"/> </ xsl:variable > < xsl:variable select =" format-number( 1000*( 24*3600*( $year*365-719527 +floor($year div 4) -floor($year div 100) +floor($year div 400) +sum($date:month/*[$month>=position()]) +format-number(substring($date,5,2)-1,0) -(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0))) +format-number( concat(0,substring($time,7, (substring($time,6,1)=':')*2)) +substring($time,1,2)*3600 +substring($time,4,2)*60,0) +$utc-offset*60) +format-number( round( (substring($time,9,1)='.') *1000*substring-before( translate( concat('0.',substring-after($time,'.'),'_'), '+-','__'),'_')),0),0)"/> </ xsl:template >
$date-time
parameter to which the formatted string is passed. The presence and number of spaces inside the string does not matter - they are all translated. Date spacers can be any single character except space.
yyyy
- year
MM
- month
dd
- day
T
- date identifier
hh
- watch
mm
- minutes
S
- fractional part of a second, may contain an arbitrary number of digits (including none)
Z
- UTC identifier timezone
[]
- the contents of the brackets can be present or not;
()
- the contents of the brackets must be present;
|
- or
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
< xsl:template name ="date:date-time" > < xsl:param name ="timestamp" /> < xsl:if test ="not(format-number($timestamp,0)='NaN')" > < xsl:variable name ="days" select ="$timestamp div (24*3600000)" /> < xsl:variable name ="time" select =" $timestamp div 1000 -floor($days)*24*3600" /> < xsl:variable name ="year" select =" 1970+floor( format-number($days div 365.24,'0.#'))" /> < xsl:variable name ="year-offset" select =" 719528-$year*365 -floor($year div 4) +floor($year div 100) -floor($year div 400) +floor($days)"/> < xsl:variable name ="month" select =" count($date:month /*[$year-offset>=sum(preceding-sibling::*)][last()] /preceding-sibling::*)" /> < xsl:variable name ="hours" select ="floor($time div 3600)" /> < xsl:variable name ="min" select ="floor($time div 60-$hours*60)" /> < xsl:variable name ="sec" select ="floor($time -$hours*3600-$min*60)" /> < xsl:variable select =" concat( format-number($year,'0000'),'-', format-number($month+1,'00'),'-', format-number( $year-offset -sum($date:month/*[$month>=position()]) +(2>$month and (($year mod 4=0 and $year mod 100!=0) or $year mod 400=0)), '00'),'T', format-number($hours,'00'),':', format-number($min,'00'),':', format-number($sec,'00'),'.', format-number( 1000*($time -$hours*3600 -$min*60-$sec), '000'),'Z')" /> </ xsl:if > </ xsl:template >
$timestamp
- the number of milliseconds elapsed from 1970-01-01T00: 00: 00Z. If the date is earlier than 1970, then the timestamp should be negative.
[ - | + ] yyyy - MM - dd T hh : mm : ss . SSS Z
[ - | + ] yyyy - MM - dd T hh : mm : ss . SSS Z
Source: https://habr.com/ru/post/95771/