This function subtracts two timestamps using a JWT calendar. The time time difference will be returned in milliseconds.


timeDifference(firstDate, dateToSubtract, calendarName, timeZone) #Output: Number


Parser expressionDescription


timeDifference({system.currentDateTime}, {issue.created}, "my-calendar", LOCAL)


This example calculates the elapsed time from issue creation to the current date and time using the calendar my-calendar.

The result will return milliseconds.


timeDifference({system.currentDateTime}, {issue.created}, "my-calendar", LOCAL) / {HOUR}


This example calculates the elapsed time from issue creation to the current date and time using the calendar my-calendar.

The result will return hours.




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

The time zone used for the conversion. 



The function returns a  .




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


timeDifference(firstDate, dateToSubtract, calendarName, additionalSpecifier, timeZone) #Output: Number



Parser expressionDescription


timeDifference({system.currentDateTime}, {issue.created}, "my-calendar", "2020/05/20 {;}", LOCAL)


This example calculates the elapsed time from issue creation to the current date and time using the calendar my-calendar and additionally ignoring the 20th of May, 2020.

The result will return milliseconds.


timeDifference({system.currentDateTime}, {issue.created}, "my-calendar", "2020/05/20 {;}", LOCAL) / {HOUR}


This example calculates the elapsed time from issue creation to the current date and time using the calendar my-calendar and additionally ignoring the 20th of May, 2020.

The result will return hours.




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. 



The function returns a



Use cases and examples



Parser function cloud
Map(error)
NotesNot possible because JWT's Calendars are not implemented in the Cloud version.






Status
Tech review

Style guide



Short descriptionSubtracts two timestamps based on a JWT calendar specification.
Output

Available since

Label