Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


UI Text Box
sizemedium
typeinfo

Returns the time instant resulting from adding offset milliseconds to base_instant within calendar in a specific timezoneThis function adds time to a given timestamp based on a JWT calendar specification.


Code Block
languagebash
titleSyntax
linenumberstrue
addTime(base_instanttimestamp, offsettimeToAdd, calendarName, timeZone) #Output: Number


UI Expand
titleExamples

Include Page
DECADIS:_snip_my_schedule_calendar
DECADIS:_snip_my_schedule_calendar

Parser expressionDescription


Code Block
languagebash
linenumberstrue
addTime(20172020/12/0401 01:00, 8 * {HOUR} + 31 * {MINUTE}, "calendarNamemy_calendar", LOCAL)


This example returns a timestamp representing:

"2017/12/04 1710:0001"


Code Block
languagebash
linenumberstrue
addTime(20172020/04/20 20:30, - 5 * {HOUR}, "calendarNamemy_schedule", LOCAL)


This example returns a timestamp representing:

"2017/04/20 13:00"

info

Since version 2.2.41 negative offset values are supported.



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
base_instanttimestamp

Status
subtletrue
titlenumber

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

Status
subtletrue
titlenumber

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

Status
subtletrue
titletext

The name of the used JWT calendar.
timeZone

Status
subtletrue
titletimezone

The time zone used for the calculation.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber
representing a timestamp.




UI Text Box
sizemedium
typeinfo

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


Code Block
languagebash
titleSyntax
linenumberstrue
addTime(base_instanttimestamp, offsettimeToAdd, calendarName, additional_termsadditionalSpecifier, timeZone) #Output: Number


Example with additional term:
UI Expand
titleExamples

Include Page
DECADIS:_snip_my_schedule_calendar
DECADIS:_snip_my_schedule_calendar

Example without an additional term:

Parser expressionDescription
Parser expressionDescription
Code Block
languagebash
linenumberstrue
addTime(2017/12/01 9:00, 25 * {HOUR}, "my-calendar", LOCAL)
This example returns: "2017/12/05 18:00"


Code Block
languagebash
linenumberstrue
dateTimeToString(addTime(20172020/12/01 9:00, 25 * {HOUR}, "my-_calendar", "20172020/12/0402 {;}", LOCAL), LOCAL, USER_LANG)


This example returns a timestamp representing:

"

2017

04/

12

Dec/

06 18

20 13:00"

UI Text Box
typeinfo

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.




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
base_instant
firstDate

Status
subtletrue
titlenumber

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

Status
subtletrue
titlenumber

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

calendarName

Status
subtletrue
titletext

The name of the
used
used JWT calendar.
additional_terms
additionalSpecifier

Status
subtletrue
titletext

A text
containing extra
containing an additional JWT calendar specification. 
timeZone

Status
subtletrue
titletimezone

The time zone used for the calculation. 



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber
representing a timestamp.


UI Text Box
typetip

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.



Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_addtime" and space = currentSpace()


Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged



Page properties
hiddentrue
id1


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




Page properties
hiddentrue


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

Status
subtletrue
titlenumber

Available since

Status
subtletrue
colourRed
titleneeds lookup

Label