# startOfWeek() in CQL: syntax and examples for Confluence

URL: https://goingstellar.ro/reference/cql/startofweek/

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

- `inc` (optional: no): 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.

## 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 2026-11-29.

```
lastmodified >= startOfWeek() AND space = SD ORDER BY lastmodified DESC
```

A running list of this week's edits in one space, newest first, for a Friday recap. Run on Confluence Cloud on 2026-11-29.

```
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 2026-11-29.

```
lastmodified >= startOfWeek("-1w") AND lastmodified < startOfWeek() AND type = page
```

Pages edited last week, with blog posts, comments and attachments filtered out. Run on Confluence Cloud on 2026-11-29.

```
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 2026-11-29.

## 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()`.

## Related

- [startOfDay()](https://goingstellar.ro/reference/cql/startofday/)
- [endOfWeek()](https://goingstellar.ro/reference/cql/endofweek/)
- [startOfMonth()](https://goingstellar.ro/reference/cql/startofmonth/)
- [lastmodified](https://goingstellar.ro/reference/cql/lastmodified-field/)
- [created](https://goingstellar.ro/reference/cql/created-field/)
- [now()](https://goingstellar.ro/reference/cql/now/)

## Sources

- [CQL functions (Atlassian Developer, Confluence Cloud)](https://developer.atlassian.com/cloud/confluence/cql-functions/)

