Automatic Dates Examples in Zolt

Basic Date Variables

Using automatic date variables:

Date Formatting with Date.format()

Use the Date.format() function to format dates:

Format Tokens

Available format tokens:

TokenDescriptionExample
DDDay (2 digits)23
DDay (1-2 digits)2
ddddDay name (full)Wednesday
dddDay name (short)Wed
MMMonth (2 digits)02
MMonth (1-2 digits)2
MMMMMonth name (full)February
MMMMonth name (short)Feb
YYYYYear (4 digits)2026
YYYear (2 digits)26
HHHour (24h, 00-23)14
HHour (24h, 0-23)14
hhHour (12h, 01-12)02
hHour (12h, 1-12)2
aam/pm (lowercase)am
AAM/PM (uppercase)AM
mmMinutes (00-59)05
mMinutes (0-59)5
ssSeconds (00-59)07
sSeconds (0-59)7

Date Localization

Date names (MMMM, MMM, dddd, ddd) are localized based on the $lang or $locale variables, which are typically defined in the document's file metadata.

Example file metadata:

---
lang: fr-FR
---

If no language is specified, the system's default locale is used.

Common Date Formats

ISO Format

Created: 2026-02-26

European Format

Created: 26/02/2026

US Format

Created: 02/26/2026

Practical Examples

Document Header

My Document

Created: 26/02/2026

Last Updated: 26/02/2026 à 10:53

Version History

Version History

VersionDateChanges
1.0.02026-02-26Initial release
1.1.02026-02-26Bug fixes and improvements

Blog Post

Post Title

Published: FEBRUARY 26, 2026

Technical Report

Report Generated: 26/02/2026 10:53

Multiple Date Formats in Same Document

Combining with Other Functions

With String Functions

Compact date: 20260226

With Math Functions

In Conditional Blocks

Use Cases

Document Templates

Meeting Minutes - 26 February 2026

Date: 26 FEBRUARY 2026

Time: 10:53

Changelog

Changelog

Version 1.0.0 (2026-02-26)

Version 1.1.0 (2026-02-26)

Effective Date: February 26, 2026

Last Updated: February 26, 2026

Date Localization

French Format

26 February 2026

French Format

26 Février 2026

German Format

26 Februar 2026

Date.now() Function

Get the current date and time:

Complex Examples

Software Release

Release Notes v2.0

Release Date: 26 FEBRUARY 2026

This version was released on 26/02/2026.

Event Planning

Conference Schedule

Event Date: thursday, FEBRUARY 26, 2026

Academic Paper

Research Paper

Submitted: 2026-02-26

Best Practices

Consistent Formatting

Define a variable for repeated formats:

Created: 26/02/2026

Modified: 26/02/2026

Always Show Both Dates

Created: 26 FEBRUARY 2026

Last modified: 26 FEBRUARY 2026 'amt' 10:53

← Back to Examples Index