xslt umbraco.library:FormatDateTime 和 /(斜杠)的使用
这可能不是一个真正的 XSLT 问题,而更像是一个 Umbraco 问题。
编写的这个函数将输出另一种格式,如expexted:
<xsl:value-of select="umbraco.library:FormatDateTime(data [@alias = 'kursusgangTilmeldingsfrist'], 'dd/MM/yyyy')"/>
当在当前日期使用这三个“第二个参数”调用时
'dd MM yyyy'
'dd-MM-yyyy'
'dd/MM/yyyy'
,输出将是:
10 02 2009
10-02-2009
10-02-2009 (and this should have been with "/" and not a "-")
Br。安德斯
This may not be a real XSLT question but more of an Umbraco question.
This function as written will output another format as expexted:
<xsl:value-of select="umbraco.library:FormatDateTime(data [@alias = 'kursusgangTilmeldingsfrist'], 'dd/MM/yyyy')"/>
When called with these three "second arguments" on the current date
'dd MM yyyy'
'dd-MM-yyyy'
'dd/MM/yyyy'
Then output will be:
10 02 2009
10-02-2009
10-02-2009 (and this should have been with "/" and not a "-")
Br. Anders
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案是使用反斜杠进行转义,因此可以像这样调用函数:
这将输出正确的日期:
Solution is to escape using a backslash so function is called like this:
And this will output correct date as: