Date Variable
A calendar date as an ISO YYYY-MM-DD string. No time zone and no clock are involved. '{{<id>}}' inserts it formatted with 'format'.
Metadata
Field index
| Field | Type | Req. | Description |
|---|---|---|---|
| type | const | yes | Variable kind. One of color, text, number, date, image, url or list.
|
| value | string | — | ISO calendar date (YYYY-MM-DD) this variable resolves to. |
| required | boolean | — | Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted. |
| label | string | — | Optional short human label for forms and fill panels. |
| description | string | — | Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents. |
| example | string | — | Illustrative ISO date shown in fill forms and used when a template is previewed with examples. Never written to output. |
| format | string | — | Date display pattern, the same LDML-style tokens as header/footer dateFormat: yyyy, yy, MMMM, MMM, MM, M, dd, d, EEEE, EEE and quoted literals. English names. Default 'MMMM d, yyyy'. |
type
typeconstrequiredyesdefault—
Variable kind. One of color, text, number, date, image, url or list.
type· Allowed values"date"
{
"type": "date"
}value
typestringrequirednodefault—pattern^\d{4}-\d{2}-\d{2}$
ISO calendar date (YYYY-MM-DD) this variable resolves to.
required
typebooleanrequirednodefaulttrue
Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted.
label
typestringrequirednodefault—
Optional short human label for forms and fill panels.
description
typestringrequirednodefault—
Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
example
typestringrequirednodefault—pattern^\d{4}-\d{2}-\d{2}$
Illustrative ISO date shown in fill forms and used when a template is previewed with examples. Never written to output.
format
typestringrequirednodefault—
Date display pattern, the same LDML-style tokens as header/footer dateFormat: yyyy, yy, MMMM, MMM, MM, M, dd, d, EEEE, EEE and quoted literals. English names. Default 'MMMM d, yyyy'.
{
"format": "MMMM d, yyyy"
}Complete definition constraints
{
"type": "object",
"required": [
"type"
],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "date",
"description": "Variable kind. One of color, text, number, date, image, url or list."
},
"value": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "ISO calendar date (YYYY-MM-DD) this variable resolves to."
},
"required": {
"type": "boolean",
"default": true,
"description": "Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted."
},
"label": {
"type": "string",
"description": "Optional short human label for forms and fill panels."
},
"description": {
"type": "string",
"description": "Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents."
},
"example": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Illustrative ISO date shown in fill forms and used when a template is previewed with examples. Never written to output."
},
"format": {
"type": "string",
"description": "Date display pattern, the same LDML-style tokens as header/footer dateFormat: yyyy, yy, MMMM, MMM, MM, M, dd, d, EEEE, EEE and quoted literals. English names. Default 'MMMM d, yyyy'.",
"examples": [
"MMMM d, yyyy",
"dd MMM yyyy",
"M/d/yyyy",
"EEEE, MMMM d"
]
}
},
"description": "A calendar date as an ISO YYYY-MM-DD string. No time zone and no clock are involved. '{{<id>}}' inserts it formatted with 'format'."
}