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
withinCalendar(timestamp, calendarName, timeZone) #Output: Boolean


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
withinCalendar(2020/12/01 8:00, "my_calendar", LOCAL)

This example returns: 

true

December 1st of 2020 is a Tuesday.

withinCalendar(2020/12/01 17:00, "my_calendar", LOCAL)

This example returns: 

false

December 1st of 2020 is a Tuesday.

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 function returns a BOOLEAN


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

Syntax
withinCalendar(timestamp, calendarName, additionalSpecifier, timeZone) #Output: Boolean


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
withinCalendar(2020/12/04 9:00, "my_calendar", "2020/12/04 {;}", LOCAL)

This example returns: 

false


The additional specifier {;} excludes December 4th from the calendar.

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 BOOLEAN

This function is usually used in a validators or the conditional execution parameter of post functions.