Versions Compared

Key

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


Page properties
hiddentrue
Status
Tech review

Status
titletodo

Style guide

Status
titletodo

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

Page properties
hiddentrue
Short descriptionTimestamp equivalent of any given day plus an offset of n days where weekends don't count.Output

Status
subtletrue
titlenumber

UI Text Box
sizemedium
typeinfo

The This function returns a

Status
subtletrue
titlenumber
date-time literal value obtained from a set of numeric values representing a date-time timestamp creates a timestamp in milliseconds based on input values.


Code Block
languagebash
titleSyntax
linenumberstrue
dateTime(number year, number month, number dayOfMonthday, number hourOfDayhour, number minute, timeZone time_zone) #Output: Number


UI Expand
titleExamples


Parser ExpressionDescription


Code Block
languagebash
linenumberstrue
dateTime(2020, 03, 01, 15, 30, LOCAL)


This example returns the timestamp of March 1st, 2020 15:30 in milliseconds.



UI Expand
titleAdditional information

Parameters used in this function

timestamp
ParameterInput (data type)Description
year

Status
subtletrue
titlenumber

The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date).year as number, e.g. 2020, 2015 or 2010.
month

Status
subtletrue
titlenumber

The month as number, e.g. 1, 5 or 12 (starting with 1 = January, ..., 12 = December).
daynumberOfDays

Status
subtletrue
titlenumber

The number defined here will be the offset in days. 

Negative values are used to substract days.

Internally JWT multiplies this value with the time macro  {DAY} to add full days to the timestamp. Learn more about time macros

day as number.

hour

Status
subtletrue
titlenumber

The hour in 24h format, e.g. 1, 12 or 23.
minute

Status
subtletrue
titlenumber

The minute as number.
timeZone

Status
subtletrue
titletimezone

The time zone used for the calculation. 



true

ui-expand
titleOutput

This function returns a

Status
subtletrue
titlenumber
 representing a timestamp

Learn more about timezones
Excerpt Include
Dates, times and time zonesDates, times and time zonesnopanel
UI Text Box
typetip

Work days might depend on the time zone - it might be Sunday on the west coast of the US while at the same time it's already Monday in Australia. 

UI Expand

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.

This function can come in handy when trying to create custom dates without calculating them based on existing dates.




Image AddedUse cases and examples

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


Page properties
hiddentrue
id1


Parser function cloud
Map(question)
Notes

Workaround

Code Block
languagebash
new Date("2020-05-03T15:53:00")

The date must be inputted as, a string with the ISO 8601 format.




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



Output
Page properties
hiddentrue


Short descriptionCreates a timestamp based on input values.
Output

Status
subtletrue
titlenumber

Available since

Status
subtletrue
colourBlue
title2.3.3

Label
title