Template dynamic variable for current day-of-week

Hi everybody.
I created a Graph to track how I dress, and collect Outfits linking clothes.

My Journal Page starts with this Properties:
day:: [[Friday]]
occupation:: [[Workday]]

There I should somehow be able to automate the Weekday using a Template. However, I was not able to figure that out.

I tried:
<% day-of-week %>
<% weekday %>
<% today day %>
<% today EEEE %>

Natural Language Dates should be possible due to Chrono, but I don’t really understand the Chrono Documentation.

Thanks for the help :slight_smile:

I don’t think it supports day of week or similar. The natural language means you can add something like <% Next Friday %> and it evaluates to the journal entry for next Friday.

Hello! Try to use 🏛 Full House Templates plugin:

In journal pages use journal day:
2024-02-24 04.08.38

In non-journal pages use today:
2024-02-24 04.07.45

Setup instructions

  1. Install the plugin
  2. Create anywhere template:
    - template:: weekday
    	- ``[(c.page.day || date.today).format('dddd')]``
    
  3. Use ⌘T (or Ctrl+T) to open template insertion UI
1 Like

Thank you for your Suggestions, I have now been able to find a Solution.

I was actually searching for a Solution without a Plugin, because I sync the Graph with my Phone and need everything on there work exactly the same.
However, on @stdword Suggestion I spotted that the Journal-Title Itself has the Day in it witch got Part of my Solution.

  1. I added the Day to the Journal Title by editing the graphs config.edn
 :journal/page-title-format "yyyy-MM-dd EEEE"
 :journal/file-name-format "yyyy-MM-dd EEEE"
  1. Then I created following Journal Template:
- ## Journal Template
  template:: Journal
  template-including-parent:: false
	-
	  day:: <% current page %>
	  occupation::
  1. and then set it as the default Template for Journals in config.edn
 :default-templates
 {:journals "Journal"}

So, how does that help me now?
I can write a Query searching for the Days Name:

{{query (and "Tuesday" (not (page [[day]])))}}

Or I can go to the Page “Tuesday” and expand the Unlinked References to see all Tuesdays:
image

Thank you a lot for reading and helping me!

1 Like