πͺ Date check
πͺ Date check
The Date Check block allows you to compare two dates to determine if an entry date is before a reference date.
This block is particularly useful for managing time constraints in interactive experiences, such as time-limited promotions, seasonal events or deadline validations.
π₯ Entries
- pivot_date (Date/Formatted Text): Reference date to which the entry date will be compared. Must be in compatible format (e.g.
YYYY-MM-DDorYYYY-MM-DDTHH:MM:SSZ).
π€ Outings
- true (Stream): Flow activated if the entry date is strictly before the reference date.
- false (Stream): Flow activated if the entry date is later than or equal to the reference date.
π‘ Example of use
Scenario: Validation of a promotional code before expiration
- A user enters a promotional code into your Celestory module.
- The system retrieves the current date via a "Current date" block.
- The flow is directed to the Date check block, configured with a reference date (ex:
2024-12-31). - If the current date is before December 31, 2024, the flow takes the true output and applies the discount.
- If the current date is later, the flow takes the false output and displays a message: "Sorry, this promotion has expired."
βοΈ Technical Details
- Date format: The block expects a strict ISO format (
YYYY-MM-DDorYYYY-MM-DDTHH:MM:SSZ). Format errors can cause unexpected behavior. - Time zones: For accurate comparisons (e.g. expiration at midnight), make sure dates are normalized to UTC or in the same time zone.
- Error management: If the input or reference date is invalid, the block systematically takes the false output.
Updated on: 04/03/2026
Thank you!
