# weekOfYear and weekOfYearIso: Jira smart values

URL: https://goingstellar.ro/reference/smart-values/weekofyear/

weekOfYear returns the week number in the traditional Western form and weekOfYearIso returns the ISO 8601 week number. Use them for weekly reports, sprint-style labels and rules that run on odd or even weeks. The two disagree on some days, so pick one and stay with it.

## Syntax

```
{{[date].weekOfYear}}
{{[date].weekOfYearIso}}
```

## Works on

- Fields: now, created, duedate and any date value
- Returns: a week number

## Examples

```
{{now.weekOfYear}}
```

The traditional week number of today. On Sunday 29 November 2026 it is one higher than the ISO number.

Result:

```
49
```

Run on Jira Cloud on 29 Nov 2026.

```
{{now.weekOfYearIso}}
```

The ISO week number of the same day.

Result:

```
48
```

Run on Jira Cloud on 29 Nov 2026.

```
Week {{now.weekOfYearIso}} of {{now.year}}
```

A label for a weekly summary comment or a Slack title.

Result:

```
Week 48 of 2026
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.duedate.weekOfYearIso}}
```

The ISO week of the due date of 15 December 2026.

Result:

```
51
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.replace("Hello World!","2027-01-01").toDate.weekOfYear}}
```

On 1 January 2027 the traditional week is already week 1 (the text is turned into a date first).

Result:

```
1
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.replace("Hello World!","2027-01-01").toDate.weekOfYearIso}}
```

The ISO number for the same day is still 53, because ISO counts it in the last week of 2026.

Result:

```
53
```

Run on Jira Cloud on 29 Nov 2026.

## Pitfalls

- The two numbers can differ on the same day. On 29 November 2026 `weekOfYear` gave 49 and `weekOfYearIso` gave 48 (checked on Jira Cloud, November 2026).
- Around the New Year the two can be far apart: 1 January 2027 is week 1 for `weekOfYear` and week 53 for `weekOfYearIso`. Do not mix them in one rule.
- The week number alone does not carry the year. Combine it with `{{now.year}}` when week 53 and week 1 can meet in the same report.

## Related

- [dayOfMonth, dayOfWeekName and other date attributes](https://goingstellar.ro/reference/smart-values/date-attributes/)
- [withDayOfMonth(), withMonth() and other with… setters](https://goingstellar.ro/reference/smart-values/date-with/)
- [diff()](https://goingstellar.ro/reference/smart-values/date-diff/)
- [Date formats (jiraDate, format(), shortTime…)](https://goingstellar.ro/reference/smart-values/date-format/)
- [startOfMonth and endOfMonth](https://goingstellar.ro/reference/smart-values/startofmonth-endofmonth/)

## Sources

- [Jira smart values: date and time (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/)

