# dayOfMonth, dayOfWeekName and date attributes: examples

URL: https://goingstellar.ro/reference/smart-values/date-attributes/

Date attributes return one part of a date as a value: the day, the month, the weekday name, the year or the time zone. Use them to build labels, to branch on the weekday, or to write a date in your own order. The weekday name follows the locale you set.

## Syntax

```
{{[date].dayOfMonth}}
{{[date].dayOfWeekName}}
{{[date].monthOfYear}}
{{[date].year}}
```

## Works on

- Fields: now, created, updated, duedate and other date values
- Returns: a number, a name or a true/false value, depending on the attribute

## Examples

```
{{now.dayOfMonth}}
```

Today's day of the month.

Result:

```
29
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.created.dayOfWeekName}}
```

The weekday the work item was created, for a rule that behaves differently at weekends.

Result:

```
Sunday
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.created.locale("fr").dayOfWeekName}}
```

The same weekday name in French.

Result:

```
dimanche
```

Run on Jira Cloud on 29 Nov 2026.

```
{{now.dayOfWeek}}
```

The weekday as a number; Sunday is 7.

Result:

```
7
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.duedate.dayOfMonth}}/{{issue.duedate.monthOfYear}}/{{issue.duedate.year}}
```

A due date written day first by joining three attributes, without a format pattern.

Result:

```
15/12/2026
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.duedate.lengthOfMonth}}
```

The number of days in the month of the due date.

Result:

```
31
```

Run on Jira Cloud on 29 Nov 2026.

## Pitfalls

- `dayOfWeek` is a number, not a name. On Sunday 29 November 2026 it gave 7, so the week ends on 7 (checked on Jira Cloud, November 2026).
- Names are not strict. `{{now.dayofweek}}` and `{{now.dayOfWeekName()}}` both rendered the expected value (checked on Jira Cloud, November 2026), so capitalisation and parentheses are not enforced.
- Attributes follow the locale only when you set it. `dayOfWeekShortName` gave `Sun` by default and `dim.` with `.locale("fr")`.
- The time zone attributes show UTC by default: `{{now.zoneId}}` gave `UTC` and `{{now.offsetShort}}` gave `Z`.

## Related

- [weekOfYear and weekOfYearIso](https://goingstellar.ro/reference/smart-values/weekofyear/)
- [Date formats (jiraDate, format(), shortTime…)](https://goingstellar.ro/reference/smart-values/date-format/)
- [locale() and withLocale()](https://goingstellar.ro/reference/smart-values/date-locale/)
- [setTimeZone() and convertToTimeZone()](https://goingstellar.ro/reference/smart-values/date-timezone/)
- [withDayOfMonth(), withMonth() and other with… setters](https://goingstellar.ro/reference/smart-values/date-with/)
- [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/)
- [Use smart values to manipulate and format dates (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-dates/)

