Statac

Dates

Write dates, set the time zone, and choose how dates look.

Write a date

Written Statac
2026-10-04 Reads the day.
2026-10-04 09:30 Reads the day and the time, in the site’s time zone.
2026-10-04T09:30 Reads it the same way. A space or a T can separate the day from the time.
2026-10-04 09:30:15 Also reads the seconds.
2026-10-04 09:30+01:00 Also reads the offset from UTC. Write it as Z, +01:00, +0100 or +01, with or without a space before it.

Write every date in front matter or in statac.yaml year first.

You seldom need to type one out:

Where the date comes from What is written
A stamp, such as date: =today statac serve or statac stamp replaces it with the day’s date: 2026-10-06. A stamp never writes an offset.
A file named 2026-10-04-post-1.md Nothing. The page takes its date from the file name. If a date: line gives a different day, the date: line wins.
statac import Each old date, rewritten year first. It keeps no more detail than the old date had, so a date with only a day stays a day.

Time zones

In statac.yaml:

timezone: Europe/London

Statac reads a date with no offset in the site’s timezone. The time zone also decides what date today is, both for a stamp and for a scheduled post. statac new offers the computer’s own time zone.

Without a timezone, Statac reads dates with no offset as UTC, never in the computer’s time zone.

How dates look

{{ page.date }} on its own shows the date in the long look of the page’s language, the way the Unicode CLDR writes it: March 4, 2026 in en or en-US, 4 March 2026 in en-GB, 4. März 2026 in de, 2026年3月4日 in ja.

In statac.yaml:

date_format: Wed 31 Dec 2025

To show every date another way, set date_format by example. Write one particular moment, Wednesday 31 December 2025 at 15:04, the way you want every date to look:

date_format Shows 2026-03-04 09:05 as
31 December 2025 4 March 2026
Wed 31 Dec 2025 Wed 4 Mar 2026
December 31, 2025 March 4, 2026
31/12/2025 04/03/2026
2025-12-31 2026-03-04
Wednesday 31st December 2025 at 3.04pm Wednesday 4th March 2026 at 9.05am

Statac copies anything else in the example, such as at or /, into every date unchanged. It doesn’t copy a word that is a slip away from one of the language’s months or weekdays: for date_format: Tusday 31 December 2025, it offers Wednesday 31 December 2025 instead.

You write Statac writes
31 The day, 4
31st The day in the language’s words, 4th
12, Dec or December The month, 03, Mar or March
2025 or 25 The year, 2026 or 26
Wed or Wednesday The weekday
15:04 The time, 09:05
3.04pm or 3:04 PM The time, 9.05am or 9:05 AM
  • If the month is in figures, the day and the month keep a leading zero, as in 04/03/2026. Set date_zeros: false in statac.yaml to get 4/3/2026 instead.
  • The site’s date_format needs the day, the month and the year, with the year in four figures. The month can be in figures, short or in full.
  • If a date has no time, Statac leaves out the time and the words that lead into it: Wednesday 4th March 2026.
  • Write the month and the weekday in the site’s language: 31 décembre 2025 on a site in French.
  • In Chinese, Japanese and Korean, write a space between a word and the letters beside it, as in 2025年12月31日 星期三. After a mark that the language’s own dates use, such as 日, no space is needed: 2025年12月31日水曜日.
<p>{{ page.date | date("December 2025") }}</p>

The date filter takes an example in the same way and uses it for one date. In the filter, you can leave out any part of the date, and the year can be short.

<time datetime="{{ page.date | moment }}">{{ page.date | date("short") }}</time>

The filter can also take the name of one of four looks. Each look writes the date the way the Unicode CLDR writes it in the page’s language, and date_format doesn’t change it.

Look In en-GB In en
long 4 March 2026 March 4, 2026
short 4 Mar 2026 Mar 4, 2026
day 4 Mar Mar 4
stamp 4 Mar 2026, 09:05 Mar 4, 2026, 9:05 AM

stamp adds the time. For a date with no time, it shows the same as short.

Where next?

Something unclear or wrong? Open an issue.