Timestamp attributes are now supported in Vercel Flags
By Steven Van ·
Date-based rules can restrict campaigns to a time window or target users by registration date, with setup in the dashboard or CLI.
Date-based targeting in Vercel Flags can now limit a campaign page to a date range or target users who registered before a cutoff. Timestamp attributes belong to entities, the users, teams, devices or requests evaluated by a flag.
Configure and supply a timestamp
In the dashboard, open Flags, select Entities, then create or select an entity. Add an attribute with its data type set to timestamp. Attributes can also be defined through the CLI.
The application must supply the attribute’s value when evaluating a flag, using matching entity and attribute names and a Unix epoch timestamp in milliseconds. The release note’s Flags SDK example passes Date.now() as system.time inside dedupe(), so every flag evaluated during the same request uses the same time.
Set date-based targeting rules
Open a flag in the dashboard and add a targeting rule that compares the timestamp attribute with a chosen date and time. Rules support “is after”, “is at or after”, “is before” and “is at or before”. The date and time picker uses the local timezone.
The CLI supports the corresponding operators after, at-or-after, before and at-or-before. See the Flags documentation.

