Articles on: Blocks Creator
This article is also available in:

πŸŸͺ 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-DD or YYYY-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


  1. A user enters a promotional code into your Celestory module.
  2. The system retrieves the current date via a "Current date" block.
  3. The flow is directed to the Date check block, configured with a reference date (ex: 2024-12-31).
  4. If the current date is before December 31, 2024, the flow takes the true output and applies the discount.
  5. 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-DD or YYYY-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

Was this article helpful?

Share your feedback

Cancel

Thank you!