nextDayOfTheWeek()

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.

Bash
nextDayOfTheWeek(timestamp, dayOfTheWeek, timeZone) #Output: Number

Examples

Parser expression

Description

Bash
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.

Bash
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

Parameter

Input (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


(books) Use cases and examples