tags:

views:

551

answers:

1

I'm trying to display the date for a year from now in an xslt file using umbraco like so:

<xsl:variable name="now" select="umbraco.library:CurrentDate()"/>
<xsl:value-of select="umbraco.library:DateAdd($now, 'year', 1)"/>

The value-of tag outputs today's date. How can I get the DateAdd to add a year to the current date?

+2  A: 

The constant 'year' is wrong. It expects just 'y'.

<xsl:variable name="now" select="umbraco.library:CurrentDate()"/>
<xsl:value-of select="umbraco.library:DateAdd($now, 'y', 1)"/>
Darrel Miller