Skip to content

Vercel Flags add timestamp attributes for date-based targeting

Flag rules can now compare against a date and time instead of just strings or numbers, for time-boxed rollouts, promotions and account-age cutoffs.

Source: Vercel

Vercel added timestamp attributes to Flags on 7 October, so a flag’s targeting rules can compare against a date and time rather than only a string or number. You set an entity attribute’s type to timestamp in the dashboard, under Flags → Entities, or from the CLI:

vercel flags entities create system --label System --attribute time:timestamp

Values passed at evaluation time must be Unix epoch timestamps in milliseconds, and rules support four operators: is after, is at or after, is before, and is at or before. Vercel’s own example passes the current time as system.time using Date.now(), wrapped in dedupe() so every flag check within the same request sees the same instant.

Why it matters: this is the kind of thing teams previously wrote by hand around a flag check — a campaign page that’s only live between two dates, a Black Friday promotion, or a rule that matches only accounts created before a cutoff. Now it’s a rule type, not custom logic.

Share

More from The Wire

All briefs