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.

Syntax
nextTime(timestamp, calendarName, timeZone) #Output: Number


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 expressionDescription
nextTime(2020/12/01 01:00, "my-calendar", LOCAL)

This example returns a timestamp representing:

"2020/12/01 08:00"

The next valid timestamp is 8AM on the same day, December 12th (which is a Tuesday).

nextTime(2020/12/01 15:00, "my-calendar", LOCAL)

This example returns a timestamp representing:

"2020/13/04 08:00"

The next valid timestamp is 8AM on the next day, December 13th.

Parameters used in this function:

ParameterInput(data type)Description
timestamp

NUMBER

The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date).
calendarName

TEXT

The name of the used JWT calendar.
timeZone

TIMEZONE

The time zone used for the calculation.

This functions returns a NUMBER representing a timestamp.


Variant of the function where you can define an additional JWT calendar specification.

Syntax
nextTime(timestamp, calendarName, additionalSpecifier, timeZone) #Output: Number


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 expressionDescription

Example without an additional term:

nextTime(2020/12/01 15:00, "my_schedule", "2020/12/04 {;}", LOCAL)

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.

Parameters used in this function:

ParameterInput(data type)Description
timestamp

NUMBER

The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date).
calendarName

TEXT

The name of the used JWT calendar.
additionalSpecifier

TEXT

A text containing an additional JWT calendar specification
timeZone

TIMEZONE

The time zone used for the calculation.

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