XSLT中上个月的最后一天 [英] Last day of previous month in XSLT
本文介绍了XSLT中上个月的最后一天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在XSLT中获得上个月的最后一天?我找到了此功能: http://www.xsltfunctions.com/xsl/functx_last-day-of-month.html ,但我不确定如何使用它来获取前一个月.
Is it possible to get the last day of the previous month in XSLT? I found this function: http://www.xsltfunctions.com/xsl/functx_last-day-of-month.html but I'm not sure how to use it to get the previous month.
推荐答案
使用:
current-date()
- xs:dayTimeDuration(concat('P', day-from-date(current-date()), 'D'))
这会产生(在2012年5月的任何一天进行评估时):
2012-04-30-07:00
这篇关于XSLT中上个月的最后一天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文