Going Stellar

Home/Confluence storage format reference

Confluence storage format

Dates with <time> in Confluence storage format

Dates are written as time elements with a datetime attribute in YYYY-MM-DD form. Confluence renders the text in its own format and adds a class that describes the distance from today. In ADF the same date is a node with a millisecond timestamp.

Storage format

<time datetime="2026-12-15" />

As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

ADF:{"content": [{"content": [{"attrs": {"timestamp": "1796083200000"}, "type": "date"}], "type": "paragraph"}], "type": "doc", "version": 1}
{
 "type": "doc",
 "content": [
  {
   "type": "paragraph",
   "content": [
    {
     "type": "date",
     "attrs": {
      "timestamp": "1796083200000"
     }
    }
   ]
  }
 ],
 "version": 1
}

Examples

Storage format sent

<p><time datetime="2026-12-15" /></p>

A date inside a paragraph, written as a self-closing time element with an ISO date.

Rendered view (HTML)

<p><time datetime="2026-12-15" class="date-future">15 Dec 2026</time></p>

Storage format after the round trip through ADF

<p><time datetime="2026-12-15" /></p>

Sent to Confluence Cloud on .

Storage format sent

ADF:{"content": [{"content": [{"attrs": {"timestamp": "1796083200000"}, "type": "date"}], "type": "paragraph"}], "type": "doc", "version": 1}

A date created from ADF, which uses a millisecond timestamp instead of a text date.

Rendered view (HTML)

<p><time datetime="2026-12-01" class="date-upcoming">01 Dec 2026</time></p>

Storage format after the round trip through ADF

<p><time datetime="2026-12-01" /></p>

Sent to Confluence Cloud on .

Storage format sent

<ac:task-list><ac:task><ac:task-status>incomplete</ac:task-status><ac:task-body>Call back <time datetime="2026-12-15" /></ac:task-body></ac:task></ac:task-list>

A date inside the text of a task, for a deadline next to a to-do.

Rendered view (HTML)

<ul class="inline-task-list" data-inline-tasks-content-id="<page id>"><li data-inline-task-id="">Call back <time datetime="2026-12-15" class="date-future">15 Dec 2026</time></li></ul>

Storage format after the round trip through ADF

<ac:task-list>
<ac:task>
<ac:task-id>3</ac:task-id>
<ac:task-uuid><id></ac:task-uuid>
<ac:task-status>incomplete</ac:task-status>
<ac:task-body><span class="placeholder-inline-tasks">Call back <time datetime="2026-12-15" /></span></ac:task-body>
</ac:task>
</ac:task-list>

Sent to Confluence Cloud on .

What changes in conversion

  • The datetime value is kept as written. The element stays self-closing, with no text inside it in storage.
  • The rendered text is not stored. The view shows 15 Dec 2026 with the class date-future, and 01 Dec 2026 with the class date-upcoming.
  • An ADF timestamp of 1796083200000 (midnight UTC) is written as datetime="2026-12-01", and the date 2026-12-15 maps to the timestamp 1797292800000.
  • Inside a task, the date survives the round trip, while the task body gets a span with class placeholder-inline-tasks and an id and uuid added.

Pitfalls

  • Write dates as YYYY-MM-DD. The datetime attribute is the only date value stored, and the displayed text is produced when the page is rendered.
  • The class on the rendered element is chosen by Confluence and is not stored. Do not use it as a data field.
  • Compare dates by the datetime value, not by the rendered text.

Questions and answers

Does the documentation describe the time element?

The storage format page does not. The behaviour on this page comes from saving and reading back pages.

Sources

  1. Atlassian Document Format: document structure (Atlassian Developer)
  2. Confluence Cloud REST API v1: content (Atlassian Developer)

Markdown version · All storage format pages