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:00, i.e., just the beginning of the day.
nextDayOfTheWeek(timestamp, dayOfTheWeek, timeZone) #Output: Number
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns: 2018/03/04 00:00 taking into account that 2018/03/01 is a Thursday. |
|
Bash
|
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 |
|---|---|---|
|
|
number |
The parameter must be valid timestamp. Usually this value is retrieved from a field (e.g. due date, created date). |
|
|
number |
The parameter must be a valid day. You can use time macros or use the function dayOfTheWeek() to specify the day. |
|
|
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
| Use case | JWT feature | Workflow function | Field type | Automated action | Parser functions |
|---|---|---|---|---|---|
| Set a date on the same week day on alternate weeks |
|
addDays() nextDayOfTheWeek() modulus() weekOfTheYear() datePart() |