fmt-date
¶
Formats a date in some locale
. Dates are assumed to be ISO dates.
Arguments¶
dt
¶
The date to format. This can be a datetime
or a dictionary with year
, month
, day
.
Example
locale
¶
The locale to use when formatting the date. A Unicode Locale Identifier. Notably, this can be used to set the calendar by setting ca
to a bcp47 calendar name.
Example
length
¶
The length of the formatted date ("full"
(default), "long"
, "medium"
, or "short"
).
Example
#let date = datetime(
year: 2024,
month: 5,
day: 31,
)
*Full*
- #fmt-date(date, length: "full")
- #fmt-date(date, length: "full", locale: "is")
- #fmt-date(date, length: "full", locale: "hi")
*Long*
- #fmt-date(date, length: "long")
- #fmt-date(date, length: "long", locale: "lo")
- #fmt-date(date, length: "long", locale: "pt")
*Medium*
- #fmt-date(date, length: "medium")
- #fmt-date(date, length: "medium", locale: "mn")
- #fmt-date(date, length: "medium", locale: "hy")
*Short*
- #fmt-date(date, length: "short")
- #fmt-date(date, length: "short", locale: "es")
- #fmt-date(date, length: "short", locale: "sk")