Date Variable
The date variable type injects the current date or time into your expansion with configurable formatting.
Basic Usage
- trigger: ":today"
replace: "{{today}}"
vars:
- name: today
type: date
params:
format: "%Y-%m-%d"
Format Specifiers
Format follows strftime conventions:
| Specifier | Output | Description |
|---|---|---|
%Y | 2026 | Year (4 digits) |
%y | 26 | Year (2 digits) |
%m | 06 | Month (zero-padded) |
%d | 14 | Day (zero-padded) |
%H | 14 | Hour (24-hour) |
%I | 02 | Hour (12-hour) |
%M | 30 | Minute |
%S | 45 | Second |
%p | PM | AM/PM |
%B | June | Full month name |
%b | Jun | Abbreviated month name |
%A | Sunday | Full weekday name |
%a | Sun | Abbreviated weekday name |
%j | 165 | Day of year |
%W | 24 | Week number |
Common Format Examples
# ISO date
params:
format: "%Y-%m-%d"
# Output: 2026-06-14
# Human-readable date
params:
format: "%B %d, %Y"
# Output: June 14, 2026
# Time only
params:
format: "%H:%M"
# Output: 14:30
# Full timestamp
params:
format: "%Y-%m-%d %H:%M:%S"
# Output: 2026-06-14 14:30:45
Date with Offset
Add an offset parameter (in seconds) to shift the date:
# Yesterday
- name: yesterday
type: date
params:
format: "%Y-%m-%d"
offset: -86400
# Tomorrow
- name: tomorrow
type: date
params:
format: "%Y-%m-%d"
offset: 86400
# Next hour
- name: next_hour
type: date
params:
format: "%H:%M"
offset: 3600
# One week from now
- name: next_week
type: date
params:
format: "%B %d"
offset: 604800
Complete Example
- trigger: ":meeting"
replace: |
Meeting scheduled: {{date}}
Tomorrow is: {{tomorrow}}
vars:
- name: date
type: date
params:
format: "%A, %B %d at %H:%M"
- name: tomorrow
type: date
params:
format: "%A, %B %d"
offset: 86400
What's Next
Learn about the Clipboard Variable for accessing system clipboard content.