You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 26 Next »

This function returns a timestamp equivalent of any given day plus an offset of n days. Weekends will not count as extra days so this function returns regular working days


Syntax
addDaysSkippingWeekends(timestamp, numberOfDays, timeZone)
Examples
Parser expressionDescription
addDaysSkippingWeekends({issue.duedate}, 2, LOCAL)

This function returns the TIMESTAMP 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.

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

This function returns the TIMESTAMP 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.

addDaysSkippingWeekends({issue.cf10100}, -6, USER_LOCAL)

This function returns the TIMESTAMP 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.

Additional information

Parameters used in this function

ParameterInput (data type)Description
timestamp

NUMBER

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

NUMBER

The number defined here will be the offset in days. Internally JWT multiplies this value with the time macro {DAY} to add full days to the timestamp. Learn more about time macros.

Negative values are used to substract days.

timeZone

TIMEZONE

The timezone used for the calculation. 

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.

Output

asdsadasdas



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.



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

addDaysSkippingWeekends(timestamp, sadasdsad, xxx)
Additional information

Parameter explanation....


Output

asdsadasdas


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.