Parse date from tiddler title

Hi there,
Newbie here, would appreciate if anyone could help with my request.

I’m looking to use TW as a basic task manager. I have tiddlers whose names start with a date (due date) followed by a space followed by some text like so:

How do I filter tasks that start with today’s (or within the current week’s) date in the tiddler title? I tried looking for solutions, but can’t seem to quite get this to work. Thanks.

try [search:title<now YYYY0MM0DD>]

The now macro can get today’s date for you in whatever format is applicable to the date you are searching for.

Welcome back @nav

Try not to create compound titles, such as yours that includes the date, which is not very readable anyway. Set a due-date field instead, and you also have created and modified dates available.

At the same time tag them with todo or set a field like object-type=todo allowing you to identify them apart from other tiddlers.

There are already a number of todo list and task manager plugins and solutions available, as a new user you may find these a better way to start.

You could go directly to a more advanced tool like Projectify.

2 Likes

Could you elaborate a little about compound titles and best practices?

I found this thread but I didn’t see an explicit “why” for this being best practice.

If you make a compound title, such as you are doing, combining the date and task, every time you want to make use of the date you need to extract it from the title.

  • This includes if you edit the title there is a risk you will “break the date”.
  • It is also much harder to use a date picker to change the date
  • What if you wanted to sort based on the title - but not the date.
  • What if your todo item exists but you have not decided on a date?
  • etc…

There are some rare cases where you may want to generate an almost identical title and want to make them unique, but this would perhaps should, be the exception not the rule.

If you do change tack as I recommended we remain here to assist.

PS

In this case assuming you titles are standard {{{ [all[current]split[ ]first[]] }}} would return the data value.

  • Split contains a space.

I’m not OP so I don’t know their exact usage cases but those are definitely considerations I will take when it comes to my own compound titles, thanks!

I agree with this as a general rule. Normalize your data!

But there are many exceptions. Because the title does double-duty as the display name for your tiddler and its unique identifier, there are plenty of times when you need to add information to a title to avoid multiple copies of “Brush Teeth” or “Reorganize Inbox”. A date might be the right info to add.

I also have a lot of tiddlers that have arbitrary numbered titles. In a wiki for a local political party, I supposed I could have a tiddler called "Fred Flintstone : Board of Selectmen : 2023-2027", but instead I just have a tiddler called "Position/47" which has fields for name, office, and term, and uses a custom title display tiddler.

Ah, I see now why this has rarely presented an issue to me. As soon as I find a reoccurring item I handle it differently, for example when done, date stamp it done. For a daily/weekly monthly etc… items in the “last done” is less Greater than “period” display it again…

  • This also allows the review period to be changed without visiting the tiddler, list all from last week, but also the week before. One date is maintained, the last, and there is no need to manufacture a next date.
    • This allows you to review items using a sliding window, look a week ahead, a moth ahead a year ahead, all based one the on and same date field, and without touching the individual tiddlers, unless I actually touch them.
  • If I really do have reoccurring information that is different every time, I tend to log it into date stamped data tiddler or “log”, and I do have my daily journal which is a good place to put such history.

In rare case such as a daily journal, I do create a new tiddler, with a new date title, but it is also displayed using a separate view template, and only if I add unique notes or checkoff a regular item does it update a field.

  • Its usually only created if I do something in a wiki.
  • I have some other tricks I use in other special cases, but I rarely, if ever do I have an issue with uniquifying a title.

@nav @hoopyfrood the above in this reply shows how powerfully we can use dates, and more so if independent from the title in tiddler fields.

Thanks @TW_Tones @Scott_Sauyet @hoopyfrood , this is very helpful!

@Scott_Sauyet is right, the reason I had the dates included in the title was to make the names unique even for daily/repetitive tasks. I felt it was easier to update the title name on mobile (than the tiny text boxes for updating fields).

I’ll start using fields instead (or even Projectify) as suggested. Thanks again for the help!

1 Like