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

This function returns a 

Status
subtletrue
titleTimestamp
equivalent of any given day plus an offset of n days where weekends don't count.. Weekends will not count as extra days so this function returns regular working days

The offset can also be a negative value. In this case days will be substracted


Code Block
titleSyntax
linenumberstrue
addDaysSkippingWeekends(timestamp, numberOfDays, timeZone)


Examples
UI Expand
titleExamples


Parser expressionDescription


Code Block
linenumberstrue
addDaysSkippingWeekends({issue.duedate}, 2, LOCAL)


This function returns the 

Status
subtletrue
titleTimestamp
 of the issue due date + 2 days

If the due date is set to a Monday the function will return a date-time for Wednesday.

If the due date is set to a Friday the function will return a date-time for Tuesday.


Code Block
linenumberstrue
addDaysSkippingWeekends({issue.duedate}, -2, LOCAL)


This function returns the 

Status
subtletrue
titleTimestamp
 of the issue due date - 2 days

If the due date is set to a Monday the function will return a date-time for Thursday.

If the due date is set to a Friday the function will return a date-time for Wednesday.


Code Block
linenumberstrue
addDaysSkippingWeekends({issue.cf10100}, -6, USER_
zone)
UI Expand
LOCAL)


This function returns the 

Status
subtletrue
titleTimestamp
 of a custom date-time field (with the ID 10100) - 6 working days.

Instead of the Jira server's local time this example uses the current user's time zone.


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. 

Learn more about working with dates, times and timezones.

title



UI Expand
titleAdditional information

Parameter

explanation....

description

ParameterInput (data type)Description
timestamp

Status
subtletrue
titlenumber

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





Output

asdsadasdas

UI Text Box

Output

asdsadasdas



Info

If represents a timestamp which coincides with a Friday, adding n = 1 will return a date-time for the following Monday.

Negative values for are used in order to subtract days to t.

(warning) Noten cannot be higher than 50000.






UI Text Box
sizemedium
typeinfo

Status
subtletrue
titleTimestamp
equivalent of any given day plus an offset of n days where in a certain timezone weekends don't count.


Code Block
linenumberstrue
addDaysSkippingWeekends(timestamp, sadasdsad, xxx)


UI Expand
titleExamples



UI Expand
titleAdditional information

Parameter explanation....


Output

asdsadasdas


Info

If represents a timestamp which coincides with a Friday, adding n = 1 will return a date-time for the following Monday.

Negative values for are used in order to subtract days to t.

(warning) Noten cannot be higher than 50000.