Sunday Of Next Week

93 views
Skip to first unread message

JamesG

unread,
Sep 23, 2010, 12:57:10 PM9/23/10
to Datejs - A JavaScript Date Library
Trying to figure out if there is a syntax that can be fed to
Date.parse() to get the concept of "The Sunday on or after the result
of Date.parse('Next Monday')"

Things I've tried

"Next Sunday" (gives what is generally though of as "This Sunday", so
if today is Thursday, it will give the first Sunday it comes to,
instead of the one after it)

"Next Monday + 7 d" (this would be ideal, but it seems that the
Relative Grammar and Math Grammar are not mixable)

"End of Next Week" (didn't really expect this one to work, but it
would be pretty cool too, though I realize the end of a week could be
Saturday or Sunday depending on context)

For the curious, the application of this would be to allow a user to
save a search that contained a date range comprised of (for example)
"next monday" and "Next Monday + 7 d" that would return, say, tasks
for next week.

Any guidance on this issue?
Reply all
Reply to author
Forward
0 new messages