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 description

Returns a 

Status
subtletrue
titlenumber
representing the timestamp for the next day of the week from dayOfWeek from timestamp t in a certain time_zone.

Output

Status
subtletrue
titlenumber

UI Text Box
sizemedium
typeinfo

The This function returns

Status
subtletrue
titlenumber
representing the a timestamp for the the next day of the week from dayOfWeek from timestamp t in occurence of any given day - based on a given date in a certain time _ zone.

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


Code Block
languagebash
titleSyntax
linenumberstrue
nextDayOfTheWeek(number ttimestamp, number dayOfWeekdayOfTheWeek, timeZone time_zone) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
nextDayOfTheWeek(2018/03/01 12:31, {SUNDAY}, LOCAL)


The function returns a

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


Code Block
languagebash
linenumberstrue
nextDayOfTheWeek(2018/03/01 12:31{issue.created}, {THURSDAY}, LOCAL)


The function returns a

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



UI Expand
titleAdditional information

Parameters used in this function

true

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

Status
subtletrue
titlenumber

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

Status
subtletrue
titletimezone

The time zone used for the calculation. 

Expand
titleLearn more about timezones
Excerpt Include
Dates, times and time zonesDates, times and time zonesnopanel


UI Text Box
typetip

Work days 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. 



UI Expand
titleOutput

The This function returns a

Status
subtletrue
titlenumber



Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_nextdayoftheweek" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloud
Map(question)
Notes

Workaround

Code Block
languagebash
let daysInWeek = [1,2,3,4,5,6,7].map(n => issue.created.plusDays(n).toCalendarDateUTC() );
let days = daysInWeek.map(d=>d.getDay());
let index = days.indexOf(4); //4 is Thursday
daysInWeek[index]





Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged



Page properties
hiddentrue


Short description

Returns a timestamp for the next occurence of any given day.

Output

Status
subtletrue
titlenumber

Available since

Status
subtletrue
colourBlue
title2.3.3

Label