Skip to content

Instantly share code, notes, and snippets.

@marcovega
Created February 14, 2024 21:34
Show Gist options
  • Save marcovega/4c02907134e115300f0a1399155ded92 to your computer and use it in GitHub Desktop.
Save marcovega/4c02907134e115300f0a1399155ded92 to your computer and use it in GitHub Desktop.
Obsidian Templater Yesterday Today Tomorrow navigation for Daily notes

<%* const noteTitle = tp.file.title; const dateFormat = "YYYY-MM-DD"; const today = moment(noteTitle, dateFormat); const yesterday = today.clone().subtract(1, 'days').format(dateFormat); const tomorrow = today.clone().add(1, 'days').format(dateFormat); %>

[[<% yesterday %>]] < [[<% noteTitle %>]] > [[<% tomorrow %>]]

@marcovega
Copy link
Author

Outputs:

[[2024-02-14]] < [[2024-02-15]] > [[2024-02-16]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment