Get Tiddlers with Created Date of Current Month and Day

158 views
Skip to first unread message

Josh Sullivan

unread,
Aug 11, 2019, 7:54:50 AM8/11/19
to TiddlyWiki
Hello,

Basically I am trying to have something I can look at to see tiddlers from previous years that have the same month and day as today. For example, I could look and see all Tiddlers created on 11 August, from 2018, 2017, etc. 

I've been trying to get it to work, but I'm not having any luck.

Any suggestions?

Cheers,
Josh

TonyM

unread,
Aug 11, 2019, 6:52:41 PM8/11/19
to TiddlyWiki
Have you tried filtering for created fields with a prefix of yyyymmdd ? You can use the now macro with a format of yyyy0mm0dd to get today's value.

Regards
Tony

Mat

unread,
Aug 12, 2019, 12:49:38 AM8/12/19
to TiddlyWiki
Yes the approach would probably be to use the <<now>> macro and the {{!!modified}} field and format the dates to show the desired date-parts.

<:-)

BurningTreeC

unread,
Aug 12, 2019, 6:27:37 AM8/12/19
to TiddlyWiki
Hi Josh, this might work:

<$set name="todayMonthDay" value=<<now 0MM0DD>>>
<$list filter="[all[tiddlers]]" variable="tiddler">
<$set name="monthDay" value={{{ [
<tiddler>get[created]split[]last[13]first[4]join[]] }}}>
<$list filter="[
<monthDay>match<todayMonthDay>]">

<
<tiddler>>

</$list>
</$set>
</$list>
</$set>



Cheers,
Josh

BurningTreeC

unread,
Aug 12, 2019, 6:35:29 AM8/12/19
to tiddl...@googlegroups.com
I need to say that this uses the new "match", "split" and "join" operators from the latest 5.1.20 release

cheers, btc
 

Cheers,
Josh

Sycom

unread,
Aug 12, 2019, 8:28:00 AM8/12/19
to TiddlyWiki
Hi,

If you do not want to upgrade to 5.1.20 yet, you may use those operators I made for my own needs (generating year / month grouped lists of tiddlers - "Creation date index attachment") : EachYear/Month and SameYear/Month are inspired form EachDay and SameDay (see https://tiddlywiki.com/#eachday%20Operator and https://tiddlywiki.com/#sameday%20Operator)

best regards,

Sylvain
@sycom
$__ext_modules_macros_sameyear.js.tid
$__ext_modules_macros_samemonth.js.tid
$__ext_modules_macros_eachyear.js.tid
$__ext_modules_macros_eachmonth.js.tid
Creation date index.tid

Josh Sullivan

unread,
Aug 12, 2019, 9:43:08 AM8/12/19
to TiddlyWiki
This is fantastic, thank you @BurningTreeC.

A question, when I added it, it didn't give the links to the actual tiddlers, just the names. At first it had system tiddlers which had live links, but I was able to filter those out, but the regular Tiddlers links are not live. I tried to use list-links, but that replicated the results a ridiculous amount of times and also didn't have the live links. Any suggestions?

Thanks again!

BurningTreeC

unread,
Aug 12, 2019, 9:51:17 AM8/12/19
to TiddlyWiki
Here you go with the same but with tiddler-links:


<$set name="todayMonthDay" value=<<now 0MM0DD>>>
<$list filter="[all[tiddlers]]" variable="tiddler">
<$set name="monthDay" value={{{ [
<tiddler>get[created]split[]last[13]first[4]join[]] }}}>
<$list filter="[
<monthDay>match<todayMonthDay>
]">

<$link to=<
<tiddler>>><<tiddler>></$link>

</$list>
</$set>
</$list>
</$set>





Cheers,
Josh

Josh Sullivan

unread,
Aug 12, 2019, 9:57:36 AM8/12/19
to TiddlyWiki
Thank you! 

Working perfectly now. I really appreciate it.

Cheers,
Josh

Mat

unread,
Aug 12, 2019, 1:32:20 PM8/12/19
to TiddlyWiki
<$link to=<<tiddler>>><<tiddler>></$link>

with 5.1.20 we can now do 

<$link to=<<tiddler>> />
 
<:-)

Mohammad

unread,
Aug 12, 2019, 3:11:53 PM8/12/19
to TiddlyWiki
Great point!
The documentation is not clear that, this has been added in 5.1.20!
but it explains as below

The content of the link widget is rendered within the <a> tag representing the link. If the content is empty then the title of the target tiddler is rendered as the default.

For example, <$link to="HelloThere"/> is equivalent to <$link to="HelloThere">HelloThere</$link> and <$link/> is equivalent to <$link to=<<currentTiddler>>><$view field="title"/></$link>.



--Mohammad

Mohammad

unread,
Aug 12, 2019, 3:16:04 PM8/12/19
to TiddlyWiki
Added to TW-Scripts.

Birthe C

unread,
Aug 13, 2019, 9:09:41 AM8/13/19
to TiddlyWiki
Hi Sylvain,

Thank you so much. This is exactly what I have wanted for a very long time.


Birthe
Reply all
Reply to author
Forward
0 new messages