format-number and time or ???

Subject: format-number and time or ???
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Fri, 10 Nov 2000 07:30:43 -0800
First is there a better function to use than format-number when trying to
make numbers look like:
02:59:12
hours:minutes:seconds

My particular need:
I am given a total number of seconds (for example 1000). I convert that to
minutes by:

<xsl:template match="time_remaining">
   <xsl:variable name="t" select="."/>
   <xsl:variable name="t.min" select="format-number(number($t) div
60,'#.00')"/>
   <span class="timeremaining">Time Remaining: <xsl:value-of
select="$t.min"/> minutes</span>
</xsl:template>

How do I set the decimal-point parameter to be ":" instead of "."?

I realize I have some more work to do on determining hours from the minutes
in the code above...

I don't suppose there is an easier way to do this? I have done a search
through the XPath and XSLT specs but could not find any reference to time.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread