Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edcottrell/61abb74c463f303e1221920ac163a9ff to your computer and use it in GitHub Desktop.
Save edcottrell/61abb74c463f303e1221920ac163a9ff to your computer and use it in GitHub Desktop.
Birthday Snippet for Obsidian Using Dataview and Frontmatter

Birthday: $= '[[' + dv.current().birthday.toString().slice(0,10) + ']]' ($= moment().diff(moment(dv.current().birthday.toString()), 'years') years old)

@edcottrell
Copy link
Author

A snippet for Obsidian notes that uses Dataview to pull the birthday metadata value for the current note (from the front matter, most likely) and produce a dynamic output that looks like this:

Birthday: [[1776-07-04]] (247 years old)

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