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

Compare with Current View Page History

Version 1 Next »

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.

Syntax
inSchedule(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 expressionDescription
inSchedule(2020/12/01 8:00, "my_schedule", LOCAL)

This example returns: 

true

December 1st of 2020 is a Tuesday.

inSchedule(2020/12/01 17:00, "my_schedule", LOCAL)

This example returns: 

false

December 1st of 2020 is a Tuesday.

Additional information

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.
Output

This function returns a NUMBER representing a timestamp.


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

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

Syntax
addTime(base_instant, offset, calendarName, additional_terms, 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 expressionDescription
inSchedule(2020/12/01 8:00, "my_schedule", LOCAL)

This example returns: 

true

inSchedule(2020/12/01 17:00, "my_schedule", LOCAL)

This example returns: 

false

Additional information

Parameters used in this function

ParameterInput (data type)Description
base_instant

NUMBER


offset

NUMBER


calendarName

TEXT

The name of the used JWT calendar.
additional_terms

TEXT

A text containing extra JWT calendar.
timeZone

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.