Skip to content

Instantly share code, notes, and snippets.

@lubieniebieski
Created November 11, 2024 20:27
Show Gist options
  • Save lubieniebieski/987ce5187c773405cfeab7cf0f47b1fd to your computer and use it in GitHub Desktop.
Save lubieniebieski/987ce5187c773405cfeab7cf0f47b1fd to your computer and use it in GitHub Desktop.
Obsidian template for DailyJournal

<%* moment.locale("en") const thisDay = window.moment(new Date(tp.file.title)); const lastYearDay = thisDay.clone().subtract(1, 'years'); const thisWeek = thisDay.format("YYYY-[W]ww"); const thisMonth = thisDay.format("YYYY-MM-[M]"); const thisDayLong = thisDay.format("dddd Do MMMM YYYY"); const thisYear = thisDay.format("YYYY-[Y]"); -%>

date: <% tp.date.now("YYYY-MM-DD") %> createdAt: <% tp.file.creation_date() %> weekly: <% thisWeek %> monthly:

  • <% thisMonth %> yearly: <% thisYear %> dateShort: <% thisDay.format("dddd Do MMMM") %> aliases:
  • <% thisDayLong %>

<% thisDayLong %>


Summary

DailySummary::

On this day...

Table without id ("[["+file.name+"|"+durationformat(this.journal-start-date - journal-start-date,"y")+" years ago"+"]]") as "Daily Summaries", DailySummary as " "
WHERE journal-start-date.month = this.journal-start-date.month AND journal-start-date.day = this.journal-start-date.day AND journal = "personal" AND journal-start-date.year != this.journal-start-date.year
SORT file.name ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment