XML Development

Moderators: None (Apply to moderate this forum)
Number of threads: 257
Number of posts: 456

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
date addition in xslt Posted by sundaresan1981 on 21 Jan 2011 at 5:26 AM
Hi

I have a date retrieved in xslt in this format "01/18/2011". I just want to know how to add 10 days to it.

the below code gives the current date,month and year.

<xsl:variable name="rightNow" select="cal:getInstance()" />
<xsl:variable name="month" select="cal:get($rightNow, 2) + 1" />
<xsl:variable name="day" select="cal:get($rightNow, 5) " />
<xsl:variable name="year" select="cal:get($rightNow, 1)" />

I have the date like this

<xsl:variable name="sampledate">01/18/2011</xsl:variable>

Plese let me know how to set this value of "sampledate" in calendar:getInstance and then add 10 days to it.

Thanks










 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.