This function returns a timestamp for the next occurence of any given day - based on a given date in a certain time zone.

The timestamp will return 00:00i.e., just the beginning of the day.

Syntax
nextDayOfTheWeek(timestamp, dayOfTheWeek, timeZone) #Output: Number
Examples
Parser expressionDescription
nextDayOfTheWeek(2018/03/01 12:31, {SUNDAY}, LOCAL)

This example returns: 2018/03/04 00:00 taking into account that 2018/03/01 is a Thursday.

nextDayOfTheWeek({issue.created}, {THURSDAY}, LOCAL)

This example might return: 2018/03/08 00:00 taking if the issue was created on 2018/03/01, which is a Thursday

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).
dayOfWeek

NUMBER

The parameter must be a valid day. You can use time macros or use the function dayOfTheWeek() to specify the day.
timeZone

TIMEZONE

The time zone used for the calculation. 

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. 

Output

This function returns a NUMBER