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

Compare with Current View Page History

« Previous Version 7 Next »

Returns the time instant resulting from adding offset milliseconds to base_instant within schedule in a specific timezone.

Syntax
addTime(base_instant, offset, schedule_name, timeZone) #Output: Number
Examples
Parser expressionDescription
addTime(2017/12/04 01:00, 8 * {HOUR} + 31 * {MINUTE}, "my_schedule", LOCAL)

This example returns: "2017/12/04 17:00"


addTime(2017/04/20 20:30, - 5 * {HOUR}, "my_schedule", LOCAL)

This example returns: "2017/04/20 13:00"

Since version 2.2.41 negative offset values are supported.

Additional information

Parameters used in this function

ParameterInput (data type)Description
base_instant

NUMBER


offset

NUMBER


schedule_name

TEXT

The name of the schedule used for the calculation.
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 Schedules Definition Grammar that will be attached to the schedule.

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

Syntax
addTime(number base_instant, number offset, string schedule_name, string additional_terms, timeZone time_zone) #Output: Number
Examples
Parser expressionDescription

Example without an additional term:

addTime(2017/12/01 9:00, 25 * {HOUR}, "my_schedule", LOCAL)
This example returns: "2017/12/05 18:00"

Example with additional term:

addTime(2017/12/01 9:00, 25 * {HOUR}, "my_schedule", "2017/12/04 {;}", LOCAL)
This example returns: "2017/12/06 18:00"
Additional information

Parameters used in this function

ParameterInput (data type)Description
base_instant

NUMBER


offset

NUMBER


schedule_name

TEXT

The name of the schedule used for the calculation.
additional_terms

TEXT

A text containing extra Schedules Definition Grammar
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.