Timestamp
This function checks whether, a given timestamp (e.g. the due date of an issue) falls into a time frame defined in a JWT calendar specification.
withinCalendar(timestamp, calendarName, timeZone) #Output: Boolean
Examples
Assumption: A custom JWT calendar called "my_calendar" has been defined as follows:
MON - THU {
08:00 - 15:00,
16:00 - 19:30;
}
FRI {
08:00 - 15:00;
}
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns:
December 1st of 2020 is a Tuesday. |
|
Bash
|
This example returns:
December 1st of 2020 is a Tuesday. |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
number |
The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date). |
|
|
text |
The name of the used JWT calendar. |
|
|
timezone |
The time zone used for the calculation. |
Output
This function returns a boolean
Timestamp with additional specifier
Variant of the function where you can define an additional JWT calendar specification.
withinCalendar(timestamp, calendarName, additionalSpecifier, timeZone) #Output: Boolean
Examples
Assumption: A custom JWT calendar called "my_calendar" has been defined as follows:
MON - THU {
08:00 - 15:00,
16:00 - 19:30;
}
FRI {
08:00 - 15:00;
}
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns:
The additional specifier |
Additional information
Parameters used in this function:
|
Parameter |
Input(data type) |
Description |
|---|---|---|
|
|
number |
The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date). |
|
|
text |
The name of the used JWT calendar. |
|
|
text |
A text containing an additional JWT calendar specification. |
|
|
timezone |
The time zone used for the calculation. |
Output
This function returns a boolean
This function is usually used in a validators or the conditional execution parameter of post functions.
📚 Use cases and examples
| Use case | Workflow function | Parser functions |
|---|---|---|
| Prevent setting due dates outside business hours | ||
| Add comment when creating issues outside of business hours |