CQL function
startOfWeek() in CQL: syntax and examples for Confluence
startOfWeek() marks the beginning of the current week. It fits a weekly review: what changed this week, or, with "-1w", what changed during the previous full week. Pair it with a second bound when you want a closed window.
Syntax
startOfWeek()
startOfWeek("inc")
Arguments
| Argument | What it does | Optional |
|---|---|---|
inc | Optional offset in the form (+/-)nn(y|M|w|d|h|m): y year, M month, w week, d day, h hour, m minute. Quoted. With no sign, plus is assumed. The unit is required and case sensitive, and the offset moves the boundary. | no |
Works with
- Fields: created, lastmodified
- Operators: =, !=, >, >=, <, <=
- Not with: ~, !~, IN, NOT IN (checked on Confluence Cloud, November 2026:
created ~ startOfWeek()is rejected)
Examples
created >= startOfWeek()Content created since the week began. This is the documentation example.
Run on Confluence Cloud on .
lastmodified >= startOfWeek() AND space = SD ORDER BY lastmodified DESCA running list of this week's edits in one space, newest first, for a Friday recap.
Run on Confluence Cloud on .
created >= startOfWeek("-1w") AND created < startOfWeek()Everything created during last week only. Paste it into a Monday status page and it stays correct all week.
Run on Confluence Cloud on .
lastmodified >= startOfWeek("-1w") AND lastmodified < startOfWeek() AND type = pagePages edited last week, with blog posts, comments and attachments filtered out.
Run on Confluence Cloud on .
ancestor = 32964613 AND lastmodified >= startOfWeek()Pages under the Company handbook that were touched this week, to see whether a policy review has started.
Run on Confluence Cloud on .
Pitfalls
- The week start is a fixed day, not a setting you pass in. On the Confluence Cloud site checked in November 2026,
startOfWeek()on a Sunday resolved to the Monday before at 00:00, so weeks run Monday to Sunday there. - To see what a function resolves to, put it on a field that rejects dates:
type = startOfWeek()fails with "Unsupported value for type, got : 2026-11-23 00:00". Values carry minute precision. - A forward offset works as well:
startOfWeek("+1d")resolved to 00:00 on the Tuesday of the same week (checked on Confluence Cloud, November 2026), so the offset counts from the week start. - Fields other than created and lastmodified do not take it:
id = startOfWeek()fails with "Can't parse as a ContentId".
Questions and answers
Does the week start on Sunday or Monday?
On the Confluence Cloud site checked in November 2026 it started on Monday at 00:00. The documentation does not say, so confirm it on your own site with type = startOfWeek().