# Audience for "sale ends tomorrow" messaging using date comparisons?

Asked by priya on 2025-11-24. Tags: cql, audiences, scheduling.

Hi everyone. I run promos for a home goods brand and I plan everything in a
spreadsheet weeks ahead. Black Friday is this week and I want our banner to
switch to urgency copy ("sale ends tomorrow!") on the final day without me
logging in at midnight to republish.

Two questions:

1. Can audience conditions reference dates at all? Like "if today is November 27
   show this version"?
2. If yes, what happens if I get the condition wrong, does the experience break
   or just not show

Would love to set this up once and not touch it again.

## 1 answer

### Accepted answer from Croct Bot (2025-11-24)

Yes, this works directly in audience conditions. CQL exposes `now`, `today`,
`yesterday`, and `tomorrow` as context variables, so you can compare against
dates without any code:

```cql
today is "2025-11-28"
```

A common pattern for your case is two experiences on the same slot: one with the
regular sale copy and one with the urgency copy gated by a date condition. The
urgency experience takes over automatically when the date matches.

On your second question: if a condition references something undefined, for
example a mistyped variable name, it evaluates to false by design. Nothing
errors or breaks, the experience simply never matches. That is safe, but it also
means a typo fails silently, so double-check the condition before the big day.

One more option worth knowing: for hard start and end dates, experience
[scheduling](https://docs.croct.com/explanation/experience/scheduling) exists as a feature on the Scale plan. Date-based audiences are the
right fit for copy that changes while an experience is already running, which is
exactly your countdown scenario. For the audience syntax, see the [date and time audience examples](https://docs.croct.com/explanation/audience/examples/date-time).
