You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

If time_instant doesn't belong to the calendar, then returns closer time in the future that belongs to it, otherwise returns time_instant.

Syntax
nextTime(time_instant, calendarName, timeZone) #Output: Number
Examples
Parser expressionDescription
nextTime(2017/12/01 01:00, "my-calendar", LOCAL)
This example returns: "2017/12/01 08:00"
nextTime(2017/12/01 15:00, "my-calendar", LOCAL)
This example returns: "2017/12/04 08:00"
Additional information

Parameters used in this function:

ParameterInput(data type)Description
time_instant

NUMBER


calendarName

TEXT

The name of the used JWT calendar.
timeZone

TIMEZONE

The time zone used for the calculation.
Output

This functions returns a NUMBER representing a timestamp.


Variant of the function where you can additionally define additional terms, which is a text containing extra JWT calendar that will be attached to the calendar.

This functions is useful to add personal holidays to an existing calendar.

Syntax
nextTime(time_instant, calendarName, additional_terms, timeZone) #Output: Number
Examples
Parser expressionDescription

Example without an additional term:

nextTime(2017/12/01 15:00, "my-calendar", LOCAL)
This example returns: "2017/12/04 08:00"

Example with additional term:

nextTime(2017/12/01 15:00, "my-calendar", "2017/12/04 {;}", LOCAL)
This example returns: "2017/12/05 8:00"
Additional information

Parameters used in this function:

ParameterInput(data type)Description
time_instant

NUMBER


calendarName

TEXT

The name of the used JWT calendar.
additional_terms

TEXT

A text containing extra JWT calendars.
timeZone

TIMEZONE

The time zone used for the calculation.
Output

This function returns a NUMBER representing a timestamp.

In the examples we have used the following definition for "my-calendar":

MON - THU {
   08:00 - 15:00,
   16:00 - 19:30;
}
 
FRI {
    08:00 - 15:00;
}

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.