Calendar
This function checks whether, a given timestamp (e.g. the due date of an issue) falls into a timeframe specified in a JWT calendar.
If it falls into the time frame, the value will be returned, otherwise the next possible timestamp based on a JWT calendar specification.
nextTime(timestamp, calendarName, timeZone) #Output: Number
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 a timestamp representing: "2020/12/01 08:00" The next valid timestamp is 8AM on the same day, December 1st (which is a Tuesday). |
|
Bash
|
This example returns a timestamp representing: "2020/12/02 08:00" The next valid timestamp is 8AM on the next day, December 2nd. |
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 functions returns a number representing a timestamp.
Calendar specifier
Variant of the function where you can define an additional JWT calendar specification.
nextTime(timestamp, calendarName, additionalSpecifier, timeZone) #Output: Number
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 |
|---|---|
|
Example without an additional term: Bash
|
This example returns a timestamp representing: "04/Dec/20 1:00 PM" The next valid timestamp is 8AM on the first day after December 4th, which is December 5th. |
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 number representing a timestamp.
The output can be written into any Jira field of type Date Picker ore Date Time Picker.
Another very common use case is to use this function in one of the JWT calculated date-time fields.
📚 Use cases and examples
| Use case | Workflow function | Parser functions |
|---|---|---|
| Set a date two months after the end of the quarter |