Due Today or Tomorrow using Dataview

I use due dates, but I also have files with names like “Tuesday - recycling” or “07 pay bills”. These sorts of files don’t have years in their dates and sometimes they don’t even have the month so I rely on filenames. If you do a similar thing the following is a dataview table that assembles them all, including birthdays (by excluding the birthday field’s year). It captures anything due today, whether it is

  • a birthday (ignores the birth year, so birthday: 1982-12-07 shows up), or
  • weekly files that begin with today’s day of week, e.g., Tuesday recycling or
  • monthly files that begin with today’s date, e.g., 07 - pay bills or
  • yearly files that begin with today’s month-date, e.g., 12-07 renew Adobe subscription or
  • files that have a due date of today, e.g., due:: 2021-12-07.
table due as "today"
where startswith(file.path, "Calendar/Weekly/" + dateformat(date(now), "ccc"))
or startswith(file.path, "Calendar/Monthly/" + dateformat(date(now), "dd"))
or startswith(file.path, "Calendar/Yearly/" + dateformat(date(now), "MM-dd"))
or striptime(due) = striptime(date(now))
or (birthday.month = date(now).month and birthday.day = date(now).day)

Tip: to make it work for “Tomorrow”, just replace all instances of date(now) with date(tomorrow).


This looks quite promising for my workflow. Am I correct in assuming that it is reliant on due:: appearing in each record somewhere?

@Jeffurry it does not - that is precisely why I use this system. I don’t want to (or know how to automatically) modify due dates for recurring events. I wasn’t about to start updating “due dates” for things like Saturday - garbage pick up.

That is why I use a Calendar folder with subfolders for Weekly, Monthly and Yearly, and this code captures those things and puts them in my daily notes when they are “due”, without a due date.

I only use due dates for things that are not recurring.

My Setup:
(note that everything under the weekly or monthly or yearly subfolders is a note.

–>Thursday recycling
–>Saturday Pick up eggs from the farm
–>Sunday Settlers of Catan

→ Monthly
—> 02 pay bills
—> 13 Crave TV
—> 17 Check mom’s data usage

→ Yearly
—> 01-03 Take down Christmas tree
—> 03-30 Renew Obsidian sync subscription
—> 08-28 Renew Spotify

Ahhh - sorry for being so dense. It is clearer now. One detail: in the image above, for the dentist appointment, there is a time for the appointment. where does that come from?

I put that in a yaml field:
due: 2021-12-08T17:30

It might also work if you just use inline dataview. Maybe just this (although I never tried putting time in a dataview field):

due:: 2021-12-08 2:30 pm

1 Like