Best method to update date fields in tiddlers?

142 views
Skip to first unread message

Jesse Racine

unread,
Nov 7, 2019, 7:12:17 PM11/7/19
to tiddl...@googlegroups.com
I'm a newbie to Tiddlywiki plugin development.

I want to work on my own plugin for task management, especially having to do with recurring tasks/meetings. My plan is to have a "duedate" field in tiddlers. If the tiddler is a recurring task tiddler, the duedate field in that tiddler will have to be updated to the next due date.

My question is, how can I update the duedate field? I've played around with view templates, so one thought I had was to update the duedate field in the view template, but I am pretty sure that is not the correct way to do it. Plus, updating it in the view template doesn't make sense, because the new duedate wouldn't be updated during a search operation (if the tiddler hadn't been viewed recently).

Any suggestions here are welcome. Thanks for your help.

** Edit**

I also wanted to add that I've only played around pretty much with macros so far. I played around with wikitext macros and also javascript macros, but that is it. I was thinking about trying to use an action-setfield widget to change the field and have the new duedate be calculated using a Javascript macro.

A Gloom

unread,
Nov 7, 2019, 10:05:53 PM11/7/19
to TiddlyWiki
Hello,

An idea...

I want to work on my own plugin for task management, especially having to do with recurring tasks/meetings. My plan is to have a "duedate" field in tiddlers. If the tiddler is a recurring task tiddler, the duedate field in that tiddler will have to be updated to the next due date.

These recurring tasks, would their due date be solely updated or will they also potentially not be updated at times?  If these recurring tasks will be regularly updated with a common new due date I would have them all read from a single tiddler where you set the updated due date.  In tiddlers, the content/text field qualifies as a field and is easily edited, transcluded-- like how temp and state tiddlers operate.  Also using the text field gives more options is the due date's content/format-- other fields can have limits on what you put into them.

Jesse Racine

unread,
Nov 7, 2019, 11:01:15 PM11/7/19
to TiddlyWiki
I was hoping to have the due date update itself "automatically" somehow. Each task has its own due date. I am not sure how I would implement that in a different tiddler. Would there be any way to have the dates checked/updated every time the tiddlywiki is opened?

A Gloom

unread,
Nov 8, 2019, 12:28:29 AM11/8/19
to TiddlyWiki
I was hoping to have the due date update itself "automatically" somehow. Each task has its own due date. I am not sure how I would implement that in a different tiddler. Would there be any way to have the dates checked/updated every time the tiddlywiki is opened?

it probably can do that-- there's so many things TW can do-- a list widget could read all due date fields and order them chronologically, or just show those within a set number of days of the current date that can be manipulated further

I was figuring all the tasks would have due dates, some constant but it sounded like some were going to have their due dates updated enmass regularly--

but right now we're going off of general outline of what you want to do that you'll be able to detail further as other suggest ideas

how would the due dates be updated by the wiki startup (which would be current date I'm assumng)-- not code-wise but the actual due dates?  would they be ordered by their due date or is the due date more like number of days rather than a date

Jesse Racine

unread,
Nov 8, 2019, 8:02:33 AM11/8/19
to TiddlyWiki
My idea is to have the due-dates shown by using the https://tiddlywiki.com/static/days%2520Operator.html days filter. The days filter can filter on any field which has a date in it (provided that the date is put in a specific format). So the plan is that the task tiddlers will have their duedate field in the proper date format that TiddlyWiki can recognize, and then the filter will work to show upcoming due tasks.

TonyM

unread,
Nov 10, 2019, 8:21:33 AM11/10/19
to TiddlyWiki
Jesse

The trick is to make a date time stamp that you click when you action it. E.g. weekly-date and make a list that only lists items with a weekly date older than 7 days. This way you do not need to update the date field except when you touch it.

Regards
Tony

A Gloom

unread,
Nov 13, 2019, 6:24:33 AM11/13/19
to TiddlyWiki
My idea is to have the due-dates shown by using the https://tiddlywiki.com/static/days%2520Operator.html days filter. The days filter can filter on any field which has a date in it (provided that the date is put in a specific format). So the plan is that the task tiddlers will have their duedate field in the proper date format that TiddlyWiki can recognize, and then the filter will work to show upcoming due tasks.

Did you find the date format in the official documentation?

created and modified time-stamp fields UTC time-stamp format: [UTC]YYYY0MM0DD0hh0mm0ssXXX

here's something else that may be of interest


Reply all
Reply to author
Forward
0 new messages