Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


UI Text Box
sizemedium
typeinfo

This function returns a number representing the week of the year of a given date in a certain time zone.


Code Block
languagebash
titleSyntax
linenumberstrue
weekOfTheYear(timestamp, firstDayOfTheWeek, minimalDaysInFirstWeek, timeZone) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
weekOfTheYear(2023/01/03, {SUNDAY}, 1, LOCAL)


This example returns: 1


Code Block
languagebash
linenumberstrue
weekOfTheYear(2023/01/03, {MONDAY}, 1, LOCAL)


This example returns: 2


Code Block
languagebash
linenumberstrue
weekOfTheYear({issue.created}, {MONDAY}, 7, LOCAL)


This example might return 20 if the issue was created in week 20.



UI Expand
titleAdditional information

Parameters used in this function

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

Status
subtletrue
titlenumber

The first day of the week, e.g.: {SUNDAY} in the U.S., and {MONDAY} in Germany. Both values are time macros.
minimalDaysInFirstWeek

Status
subtletrue
titlenumber

The minimal number of days required in the first week of the year, e.g., if the first week is defined as the one that contains the first day of the first month of the year, value 1 should be used.

If the minimal number of days required must be a full week (e.g. all days of the week need to be in that year), value 7 should be used.

timeZone

Status
subtletrue
titletimezone

The time zone used for the calculation. 


UI Text Box
typetip

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

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_weekoftheyear" and space = currentSpace()


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 the week of a year.

Output

Status
subtletrue
titlenumber

Available since

Status
subtletrue
colourBlue
title2.6.0

Label