Changing the Date Format Displayed by Quarto
date-format option.
Original Japanese version: Quartoで表示される日付型を変更する
When Quarto displays dates for blog posts, the default format is the medium date style. This looks like Jan 30, 2026. However, there are times when you may want to display dates in an ISO 8601 style such as 2026-01-30.
The date-format Option
To change how Quarto displays dates, set the date-format option. You can change the displayed date format by specifying this option in a YAML header or in _quarto.yml. The place where this is most commonly used is probably the listing page for blog posts.
When listing multiple articles, such as blog posts, add the date-format option to the YAML header of posts.qmd.
posts.qmd
---
title: "Blog"
listing:
contents: posts
sort: "date desc"
type: default
categories: true
date-format: iso
---If you want to change the date format on individual article pages, add the date-format option to each article’s YAML header.
posts/2026-01-30-quarto-data-format.qmd
---
title: "Changing the Date Format Displayed by Quarto"
date: "2026-01-30"
date-modified: "2026-01-30"
date-format: iso
---You can also add it as a global setting in _quarto.yml.
_quarto.yml
date-format: isoTypes of Date Formats
There are two ways to change the display format.
- Specify a date style.
- Specify a custom format.
Specifying a Date Style
Quarto supports date styles such as the following.
short: short format, for example1/30/26medium: medium format, for exampleJan 30, 2026long: long format, for exampleJanuary 30, 2026full: full format, for exampleFriday, January 30, 2026iso: ISO 8601 format, for example2026-01-30
Specifying a Custom Format
If you want finer control over the style, use a custom format. To specify a custom format, set a format string in the date-format option. For example, to display dates as 2026/01/30, specify the following.
date-format: "yyyy/MM/dd"For details on custom formats, see the following official documentation.
Differences by Language Setting
In Quarto, the displayed date format is also affected by the language setting. For example, with a Japanese setting, the medium style is displayed like 2026年1月30日. To change the language setting, set the lang option in a YAML header or in _quarto.yml.
_quarto.yml
format:
html:
lang: jaIt may also be fine to set it at the top level.
For details on the lang option, see the following official documentation.