Date

Description

Date elements represent temporal information within ADF documents. They can display dates in various formats and provide timestamp functionality for deadlines, events, and time-sensitive content. Date elements support localization and different display formats.

.md markdown syntax

Standard Date Format

{date:2023-12-25}
2023-12-25

Note: Both {date:YYYY-MM-DD} format and standalone YYYY-MM-DD format are supported and convert to Unix timestamps in ADF.

ISO Date Format

{date:2023-03-15T10:30:00Z}

Date with Custom Format

<!-- adf:date timestamp="1703462400000" format="DD/MM/YYYY" -->
{date:2023-12-25}

Date with Timezone

Relative Date

.adf-schema.json schema

Conversion Behavior

Markdown to ADF

  • 2023-12-25 (standalone) → {"type": "date", "attrs": {"timestamp": "1703462400000"}}

  • {date:2023-12-25} (braced) → {"type": "date", "attrs": {"timestamp": "1703462400000"}}

  • Dates are converted to Unix timestamps in milliseconds (UTC, 00:00:00)

ADF to Markdown

  • {"type": "date", "attrs": {"timestamp": "1703462400000"}}2023-12-25<!-- adf:date attrs='{"timestamp":"1703462400000"}' -->

  • Timestamps are converted back to YYYY-MM-DD format

  • Additional attributes are preserved in metadata comments for round-trip accuracy

Round-trip Conversion

The parser ensures that dates maintain accuracy through multiple conversion cycles:

Examples

Project Deadlines

Meeting Schedules

Document Timestamps

Event Planning

Release Schedule

Training Calendar

Maintenance Windows

Historical Records

Due Dates in Tasks

Billing Cycles

Anniversary Dates

Compliance Deadlines

Vacation Schedule

Last updated