XSLT umbraco.library: FormatDateTime et l'utilisation de la barre oblique (/)
-
19-09-2019 - |
Question
Cela peut ne pas être une vraie question XSLT mais plus d'une question Umbraco.
Cette fonction en tant que sortie de testament écrit un autre format comme expexted:
<xsl:value-of select="umbraco.library:FormatDateTime(data [@alias = 'kursusgangTilmeldingsfrist'], 'dd/MM/yyyy')"/>
Quand appelé ces trois « deuxième arguments » à la date actuelle
'dd MM yyyy'
'dd-MM-yyyy'
'dd/MM/yyyy'
Ensuite, la sortie sera:
10 02 2009
10-02-2009
10-02-2009 (and this should have been with "/" and not a "-")
Br. Anders
La solution
La solution est d'échapper à l'aide d'une barre oblique inverse si la fonction est appelée comme ceci:
<xsl:value-of select="umbraco.library:FormatDateTime(data [@alias = 'kursusgangTilmeldingsfrist'], 'dd\/MM\/yyyy')"/>
Et cette volonté sortie date correcte comme:
10/02/2009
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow