【发布时间】:2018-09-03 10:48:22
【问题描述】:
我正在尝试使用 MarkLogic 获取任何选定日期的第一天和最后一天的日期。
示例:
let $date := xs:date("2018-08-24")
let $firstDay := "*Should be 1st day of month - of $date*"
let $lastDay := "*Should be last day of month - of $date*"
return ("$firstDay:",$firstDay,"$lastDay:",$lastDay)
预计输出日期:
$firstDay: 2018-08-01$lastDay: 2018-08-31
我可以通过使用 functx:first-day-of-month($date) 和 functx:last-day-of-month($date) 但我想知道 MarkLogic
是否提供任何 API 或替代选项【问题讨论】:
标签: date xquery marklogic marklogic-8