Reputation: 10538
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"
Upvotes: 0
Views: 49
Reputation: 241525
Date.js hasn't been updated in 8 years. It has lots of bugs. You can try the DateJS: Evolved fork, which has resolved many of them.
Moment.js does not currently have the functionality to interpret a string like that.
Upvotes: 1