Skip to main content

date_range

Synopsis

@date_range(DateTime, DateTime) -> Boolean

Description

Checks whether the object creation time (in Contextal Platform) falls within the provided date and time ranges. All times are in UTC.

info

Available in Contextal Platform 1.0 and later.

Parameters

The first argument is the start date, and the second one is the end date.

Return value

Boolean: true if the object matches the date/time range, false otherwise.

Examples

@date_range("2024-09-26", "2024-09-26")
  • This matches objects with creation time of 2024-09-26 00:00:00 until 2024-09-26 23:59:59.999 (UTC times).
@date_range("2024-09-26 12:00:00", "2024-09-27 12:00:00")
  • This matches objects with creation time of 2024-09-26 12:00:00 until 2024-09-27 12:00:00.999 (UTC times).