Utilisation de DateAdd dans umbraco xslt pour afficher la date de l'année prochaine
Question
J'essaie d'afficher la date dans un fichier xslt dans un fichier xslt en utilisant umbraco comme ceci:
<xsl:variable name="now" select="umbraco.library:CurrentDate()"/>
<xsl:value-of select="umbraco.library:DateAdd($now, 'year', 1)"/>
La balise value-of affiche la date du jour. Comment puis-je obtenir DateAdd pour ajouter une année à la date actuelle?
La solution
La constante "année" est fausse. Il attend juste le «y».
<xsl:variable name="now" select="umbraco.library:CurrentDate()"/>
<xsl:value-of select="umbraco.library:DateAdd($now, 'y', 1)"/>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow