This function adds time to a given timestamp based on a JWT calendar specification.


addTime(timestamp, timeToAdd, calendarName, timeZone) #Output: Number


Parser expressionDescription


addTime(2020/12/01 01:00, 8 * {HOUR} + 31 * {MINUTE}, "my_calendar", LOCAL)


This example returns a timestamp representing:

"2017/12/04 10:01"


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


This example returns a timestamp representing:

"2017/04/20 13:00"



Parameters used in this function

ParameterInput (data type)Description
timestamp

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

Time to be added in milliseconds. Usually time macros will be used to convert to input to hours, days etc.
calendarName

The name of the used JWT calendar.
timeZone

The time zone used for the calculation.



This function returns a representing a timestamp.




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


addTime(timestamp, timeToAdd, calendarName, additionalSpecifier, timeZone) #Output: Number


Parser expressionDescription


dateTimeToString(addTime(2020/12/01 9:00, 25 * {HOUR}, "my_calendar", "2020/12/02 {;}", LOCAL), LOCAL, USER_LANG)


This example returns a timestamp representing:

"04/Dec/20 13:00"

A day consists of 10.5 hrs according to my_calendar. Adding 25 hrs to the specified timestamp, ignoring December 2nd, results in December 4th, 1PM.




Parameters used in this function

ParameterInput (data type)Description
firstDate

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

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

calendarName

The name of the used JWT calendar.
additionalSpecifier

A text containing an additional JWT calendar specification
timeZone

The time zone used for the calculation. 



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




Status
Tech review

Style guide




Parser function cloud
Map(error)
NotesCurrently not possible because its behavior depends on calendars.





Short descriptionAdds or subtracts days to or from any given timestamp based on a JWT calendar specification.
Output

Available since

Label