The function returns a NUMBER representing the week of the year of the date-time t in a certain time_zone.
weekOfTheYear(number t, number firstDayOfTheWeek, number minimalDaysInFirstWeek, timeZone time_zone) #Output: Number
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 3 Next »
The function returns a NUMBER representing the week of the year of the date-time t in a certain time_zone.
weekOfTheYear(number t, number firstDayOfTheWeek, number minimalDaysInFirstWeek, timeZone time_zone) #Output: Number
Parser expression | Description |
---|---|
weekOfTheYear(2023/01/03, {SUNDAY}, 1, LOCAL) | The function returns the NUMBER : 1 |
weekOfTheYear(2023/01/03, {MONDAY}, 1, LOCAL | The function returns the NUMBER : 2 |
weekOfTheYear(2023/01/03, {MONDAY}, 7, LOCAL) | The function returns the NUMBER : 1 |
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). |
firstDayOfTheWeek | NUMBER | The first day of the week, e.g.: {SUNDAY} in the U.S., and {MONDAY} in Germany |
minimalDaysInFirstWeek | NUMBER | 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 | TIMEZONE | The time zone used for the calculation. |
Work 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.
The function returns a NUMBER
Powered by Atlassian Confluence 8.5.7, themed by Refined 7.5.3 and Decadis AG