Skip to content

Instantly share code, notes, and snippets.

@Boot-Error
Last active July 29, 2021 04:20
Show Gist options
  • Select an option

  • Save Boot-Error/5bda96fab058d1af67d174673a845923 to your computer and use it in GitHub Desktop.

Select an option

Save Boot-Error/5bda96fab058d1af67d174673a845923 to your computer and use it in GitHub Desktop.
Resurfacing notes in Obsidian using dataview js query
const diffInDaysFromToday = (toDate) => {
const today = new Date()
return Math.ceil((today - toDate)/(1000 * 3600 * 24))
}
dv.list(dv.pages()
.filter(p => p.file.name.contains("🌳"))
.where(p => diffInDaysFromToday(p.reviewed) > p.retention)
.map(p => p.file.link))
@Boot-Error
Copy link
Author

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