The query last Sunday - 7days
returns Wednesday, July 22, 2015 12:00:00 AM
(tested on datejs.com). If the issue is unresolvable, can moment.js serve similar queries, especially for dates in the past (the docs do not show equivalents)?
Update: Sugar - this great library solved the problem:
Date.create('this Sunday') // equivalent to "last Sunday"
Date.create('last Monday') // equivalent to "last Sunday - 7days"
Date.create('six days before Sunday') // equivalent to "last Sunday - 7days"
答案 0 :(得分:1)
Date.js尚未在8年内更新。它有很多错误。您可以尝试DateJS: Evolved分叉,它已解决了许多分支。
Moment.js目前没有解释类似字符串的功能。