Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Using XSL to calculate time (t = hh:mi + mi)

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 12/1/2006 2:05:00 PM

kebabkongen@h... wrote:

> With XSLT only, I would like to generate the time the next program
> starts.
> Ex: If the current program starts at 10:30 and lasts for 60 minutes, I
> wish to display that the next program starts at 11:30.
> The server seems to be running XSL 1.0.

XSLT/XPath 1.0 have basic string parsing functions which allow you to 
split up that value into two numbers, then you can compute the time in 
minutes, add the other minutes value and then you need to convert back 
to a time value.
XPath string functions are here:
<http://www.w3.org/TR/xpath#section-String-Functions>
XPath number operators (div, mod) and functions are here:
<http://www.w3.org/TR/xpath#numbers>
<http://www.w3.org/TR/xpath#section-Number-Functions>


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent