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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Use:
current-date()
- xs:dayTimeDuration(concat('P', day-from-date(current-date()), 'D'))
This produces (when evaluated on any day of May 2012):
2012-04-30-07:00