Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Using XSL to calculate time (t = hh:mi + mi) >Thread Next - Re: Using XSL to calculate time (t = hh:mi + mi) Re: Using XSL to calculate time (t = hh:mi + mi)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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
