The correct Templater formatting for the end of the month

Things I have tried

I have added this so far in my Daily Note template:

<%* if (tp.date.now(“M-D”) == “1-1”) { %>

  • [ ] Make Yearly Note
    <%* } _%>
    <%* if (tp.date.now(“D”) == “1”) { %>
  • [ ] Make Monthly Note
    <%* } _%>
    <%* if (tp.date.now(“ddd”) == “Mon”) { %>
  • [ ] Make Weekly Note
    <%* } _%>
    <%* if (tp.date.now(“M-D”) == “12-31”) { %>
  • [ ] Do Yearly Review
    <%* } _%>
    <%* if (tp.date.now(“ddd”) == “Sun”) { %>
  • [ ] Do Weekly Review
    <%* } _%>
    <%* if (tp.date.now(“D”) == “last”) { %>
  • [ ] Do Monthly Review
    <%* } _%>
    <%* if (tp.date.now(“M-D”) == “01-01”) { %>
  • [ ] Make Quarterly Note
    <%* } _%>
    <%* if (tp.date.now(“M-D”) == “03-31”) { %>
  • [ ] Do Quarterly Review
    <%* } _%>
    <%* if (tp.date.now(“M-D”) == “04-01”) { %>
  • [ ] Make Quarterly Note
    <%* } _%>
    <%* if (tp.date.now(“M-D”) == “06-30”) { %>
  • [ ] Do Quarterly Review
    <%* } _%>
    <%* if (tp.date.now(“M-D”) == “07-01”) { %>
  • [ ] Make Quarterly Note
    <%* } _%>
    <%* if (tp.date.now(“M-D”) == “09-30”) { %>
  • [ ] Do Quarterly Review
    <%* } _%>
    <%* if (tp.date.now(“M-D”) == “10-01”) { %>
  • [ ] Make Quarterly Note
    <%* } _%>
    <%* if (tp.date.now(“M-D”) == “12-31”) { %>
  • [ ] Do Quarterly Review
    <%* } _%>
    <%* if (tp.date.now(“M-D”) == “12-31”) { %>
  • [ ] Do Yearly Review
    <%* } _%>

Where I have added “last” into the Do monthly review I am not convinced this is correct, but I can’t work out what to put as of course different months have a different amount of days and I am sure it is quicker than having to add a row form every month.

What I’m trying to do

I have been searching this forum and Reddit all day and I can’t confirm whether the word last will do, or if there is a much quicker, cleaner way or doing this.

I can’t help, but Is this using Templater? If so, it might help to mention it in the title and to check Templater’s Github issues if you haven’t.

It is Templater yes, I tried to update the post but it wouldn’t let me. I have spent quite a lot of time on the GitHub page for Templater reading the bits I understand. I did that before posting here.

I changed the title for you (and added the “templater” tag now that I know it exists). If you want it changed again, just let me know.

Hey @CreativeFibro, I just posted up a startup script to the Templater discussion thread on github that sort of handles this.

Each time Obsidian is opened, the script automatically runs and checks if a weekly, monthly, quarterly, and yearly file exists for the current date. If one exists, it moves on, if not, it creates the file using the appropriate template, in the appropriate place. It does not open the files.

I am sure the code could be tweaked to use exact dates… Maybe you could use it as a starting point?

2 Likes

Thank you,

As it is I decided to go down a different route and instead of using the list of instructions in the daily note template, I have installed the tasks plugin and I was able to easily set up the tasks I needed.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.