Another approach to using "hard" dates is to take advantage of the <Today> element and it's OffsetDays attribute... Here is a sample of code that uses the <Today> CAML element to get all items after a certain date based on an offset from "today" to the beginning of the week:
(Full disclosure: I have not tested this specific example, but have used similar one solution I have developed)
(Full disclosure: I have not tested this specific example, but have used similar one solution I have developed)
var daysFromSunday = (new Date()).getDay(),
dateOffset = (
daysFromSunday > 0
? " OffsetDays='-" + daysFromSunday + "'"
: ""
),
query;
var query = "<Query>" +
"<Where>" +
"<Gt>" +
"<FieldRef Name='CreateDate' />" +
"<Value Type='DateTime'>" +
"<Today" + dateOffset + "/>" +
"</Value>" +
"</Gt>" +
"</Where>" +
"</Query>";
The code above, if used today - Monday - would generate a <Today> element like the following:<Today OffsetDays='-1'/>
/Paul.