Rules that depend on dates: new products, ending offers
Mark new arrivals, offers about to expire or this week's sales with a rule that compares a date with a day counted from today, such as 60 days ago.
Updated November 6, 2026
Some labels depend on the calendar: "News" for new arrivals, "Last chance" for an offer about to expire, "On sale" while
a sale runs. You build them with a rule that compares a date column with a day counted from today, such as published
is on or after 60 days ago. Because it isn't a fixed date, the rule keeps working as the days go by.
To print a date or a day count in an ad instead, see Working with dates.
Compare a date with today#
In a rule's condition on a date column, click the clock button next to the date and choose a number of days ago or
days from now, or today. It works with is before, is on or before, is after, is on or after,
is between, is exactly and is not, and it counts whole days:
- published is on or after 60 days ago matches today and the 60 days before.
- published is after 60 days ago matches today and the 59 days before.
- sale end date is before 7 days from now matches offers ending within the next 7 days, and offers that have
already ended. Add sale end date is on or after today to leave those out.
The column has to be set to Date in the Feed columns rail, on the Rules tab or the
Mapping tab, or carry a Shift date step in the
condition (see the recipe below). That includes a column a rule writes: the columns under Rule outputs have the same
type badge.
On a column that isn't set to Date, is before, is after and the other ordering comparisons stop Publish with
a message telling you to set the type. is exactly today doesn't stop it, but it compares text, so it only matches a
product whose value is literally the word "today".
How often it updates#
A rule that compares a date with today is re-checked for every product once a day, at the catalog's first import after a fixed moment between midnight and 6:00 UTC.
In practice that lands by about 7:15 UTC, or an hour later if you started an import or a publish just before the
scheduled one. So a result changes in the early hours UTC, not at your own midnight. A product whose feed data changes is
also re-checked at every import.
- Credits. If one of your prompts reads a value such a rule sets, the prompt writes new content for every product
whose result changed, and that uses Credits.
- Time zones. A date that carries a time zone offset changes day at its own midnight, not UTC's, and the result waits
for the next re-check. A date ahead of UTC (Sweden in summer, +02:00) can show yesterday's result for up to about nine
hours into its day. A date behind UTC, such as -05:00, can take until the next day's re-check.
- Failing imports. While a catalog's imports fail, its products keep the results of the last import that succeeded.
- Previews. The rule editor's sample, a product trace and Aimée's explanation of a product work out "today" when you
open them, so they can be ahead of your imported products for a few hours after midnight UTC.
The scheduled import that runs the re-check usually says "Re-checking the rules that compare dates with today — a new
day began" in the Imports table on the catalog's Activity tab. It looks at every product, but updates only those
whose result changed.
Recipe: mark new products#
Three ways to label new arrivals, best first:
- Compare the publish date with "days ago" (recommended). Set your
published column to Date on the Mapping
tab. Then add a rule: published is on or after 60 days ago, with the action Set field custom_label_0 =
News.
- Count the days between two feed dates. When the gap you care about is between two dates in your feed, put a step
on the condition's own column: click the column in the condition, choose + Add step, add a Date difference to
the other column, and compare the result as a number: published, with a Date difference to sale_start in days,
is less than 60. A Shift date step there keeps the result a date, so the condition can compare it with "days
ago" even when the column isn't set to Date.
- Write the result to a column first. A Set field rule can write a Date difference or Shift date result into a
column, and a later rule compares that column. Set the column to Number for a Date difference result, so the rule
editor offers is less than. Set it to Date for a Shift date result, so it can be compared with "days ago".
Templates and channels#
The same "days ago" comparison works on a date field in channel rules and Studio template
automations. Nothing re-checks a channel at midnight, though: the condition is checked each time the
channel runs, after an import that changes any of its products, a publish, a template publish or Regenerate. For a
label that has to change on its own every day, put the rule in the catalog instead.
Steps on a condition's column aren't applied in templates and channels: the condition compares the field's value itself.
Why catalog rules have no Today's date#
A catalog can't use Today's date as a value anywhere in a rule or on the Mapping tab, conditions included. A value
taken from the clock would change every product every day, which would update your products, re-run your channels and
generate prompt content again. Compare a date column with "60 days ago" or the like instead, so only the products whose
result changes are updated.
When Renable won't publish#
Publish stops and names the rule when a date rule can't work:
- The column isn't a Date column. A rule uses is before, is after or another ordering comparison with a day
counted from today, on a column that would be compared as text. Set its type to Date on the Mapping tab.
- Days ago compared with an expression or a lookup. It can only be compared with a single Date column. Compare a Date
column instead, or pick a date in the calendar.
- A number compared with a date, or a date compared with a number. A column with a Date difference step compares
a number of days, so give it a number such as 60, not a day picked in the calendar. A Shift date step makes a date,
so compare it with a date or "days ago", not a number.
- Today's date used as a value. Compare a date column with "days ago" instead.
- A "days ago" comparison in an auxiliary feed. An auxiliary feed is only re-read when its file changes, so the result
would never move. Compare the date in the catalog's own rules on the Rules tab. Date difference and Shift date between
two dates in your feed do work in auxiliary feeds.
One problem stops the catalog saving rather than publishing: two column types set for the same column, because the same
name is written with different capitals, such as Published and published. The Mapping tab marks the pair in red under
Other column types. Remove the one you don't want.