Skip to content

Instantly share code, notes, and snippets.

@smeech
Created May 21, 2025 12:29
Show Gist options
  • Save smeech/4bfc48780fb5fb700ab974d5d27d5be8 to your computer and use it in GitHub Desktop.
Save smeech/4bfc48780fb5fb700ab974d5d27d5be8 to your computer and use it in GitHub Desktop.
[Date formats] Choice or list box to select today's date in different formats #espanso
- trigger: :date
replace: "{{Output.Date}}"
vars:
- {name: Day, type: date, params: {format: '%d'}}
- {name: Month, type: date, params: {format: '%m'}}
- {name: Year2, type: date, params: {format: '%y'}}
- {name: Year4, type: date, params: {format: '%Y'}}
- {name: Another, type: date, params: {format: '%A, %B %d, %Y'}}
- name: Output
type: form
params:
layout: '[[Date]]'
fields:
Date:
type: choice # or list
values:
- '{{Year4}}-{{Month}}-{{Day}}'
- '{{Day}}/{{Month}}/{{Year2}}'
- '{{Day}}-{{Month}}-{{Year2}}'
- '{{Day}}/{{Month}}/{{Year4}}'
- '{{Another}}'
default: '{{Year4}}-{{Month}}-{{Day}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment