Using automatic date variables:
Use the Date.format() function to format dates:
Available format tokens:
| Token | Description | Example |
|---|---|---|
DD | Day (2 digits) | 23 |
D | Day (1-2 digits) | 2 |
dddd | Day name (full) | Wednesday |
ddd | Day name (short) | Wed |
MM | Month (2 digits) | 02 |
M | Month (1-2 digits) | 2 |
MMMM | Month name (full) | February |
MMM | Month name (short) | Feb |
YYYY | Year (4 digits) | 2026 |
YY | Year (2 digits) | 26 |
HH | Hour (24h, 00-23) | 14 |
H | Hour (24h, 0-23) | 14 |
hh | Hour (12h, 01-12) | 02 |
h | Hour (12h, 1-12) | 2 |
a | am/pm (lowercase) | am |
A | AM/PM (uppercase) | AM |
mm | Minutes (00-59) | 05 |
m | Minutes (0-59) | 5 |
ss | Seconds (00-59) | 07 |
s | Seconds (0-59) | 7 |
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.
Created: 2026-02-26
Created: 26/02/2026
Created: 02/26/2026
Created: 26/02/2026
Last Updated: 26/02/2026 à 10:53
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2026-02-26 | Initial release |
| 1.1.0 | 2026-02-26 | Bug fixes and improvements |
Published: FEBRUARY 26, 2026
Report Generated: 26/02/2026 10:53
Compact date: 20260226
Date: 26 FEBRUARY 2026
Time: 10:53
Effective Date: February 26, 2026
Last Updated: February 26, 2026
26 February 2026
26 Février 2026
26 Februar 2026
Get the current date and time:
Release Date: 26 FEBRUARY 2026
This version was released on 26/02/2026.
Event Date: thursday, FEBRUARY 26, 2026
Submitted: 2026-02-26
Define a variable for repeated formats:
Created: 26/02/2026
Modified: 26/02/2026
Created: 26 FEBRUARY 2026
Last modified: 26 FEBRUARY 2026 'amt' 10:53