DateTimeBetween
DateTimeBetween
yaml
type: "io.kestra.plugin.core.condition.DateTimeBetween"
Condition to allow events between two specific datetime values.
Examples
yaml
# This will evaluate to true when the trigger date falls after the `after` date.
- conditions:
- type: io.kestra.plugin.core.condition.DateTimeBetween
date: "{{ trigger.date }}"
after: "2024-01-01T08:30:00Z"
# This will evaluate to true when the trigger date falls between the `before` and `after` dates.
- conditions:
- type: io.kestra.plugin.core.condition.DateTimeBetween
date: "{{ trigger.date }}"
before: "2024-01-01T08:30:00Z"
after: "2024-12-31T23:30:00Z"
Properties
date
- Type: string
- Dynamic: ✔️
- Required: ✔️
- Default:
{{ trigger.date }}
The date to test.
Can be any variable or any valid ISO 8601 datetime. By default, it will use the trigger date.
after
- Type: string
- Dynamic: ❌
- Required: ❌
- Format:
date-time
The date to test must be after this one.
Must be a valid ISO 8601 datetime with the zone identifier (use 'Z' for the default zone identifier).
before
- Type: string
- Dynamic: ❌
- Required: ❌
- Format:
date-time
The date to test must be before this one.
Must be a valid ISO 8601 datetime with the zone identifier (use 'Z' for the default zone identifier).
Was this page helpful?