Question on "sort by date"

75 views
Skip to first unread message

BirgitB

unread,
May 17, 2020, 3:09:35 PM5/17/20
to TiddlyWiki
Hi there,

I am new to this group and let me warn you right away: My coding skills are limited to copying code somebody tells me to use. I can read and understand HTML and CSS to a certain extent, but that's all.

I started using TiddlyWiki about 3 weeks ago and I am really impressed by this wealth of functionality.

In my TOC there is a tiddler named "events 2020" and I am listing continuous education events in this section for which I use the naming convention "dd.mm.yyyy - Name of Event".
Since write in German, some terms need to be capitalized, just in case that this should matter.

At the moment, the tiddlers in this section are sorted by the dd values. Is there a way of sorting the tiddlers by the full date or at least by dd.mm.?

Thanking you very much in advance.
Birgit


Riz

unread,
May 17, 2020, 3:43:37 PM5/17/20
to TiddlyWiki
There is no out of the box way to do this. Pat best someone could write a macro that will be a workaround, or a JavaScript filter specifically for this purpose.

If you have only started, shifting the naming scheme to YYYY-MM-DD would be a good idea. If you don't want to do that, you can create an extra field in tiddlers containing date in that format, and sort by that field instead of title

BirgitB

unread,
May 17, 2020, 4:31:59 PM5/17/20
to TiddlyWiki
Thank you, Riz,

inspired by your suggestions I found this information:

How to change the sort order of sub-branches in a TOC macro


Unfortunately, that still does not change the sorting order to dd.mm.

Any other suggestions will be appreciated.

Regards,
Birgit

Mat

unread,
May 17, 2020, 5:22:27 PM5/17/20
to TiddlyWiki
I agree with Riz; it would be much better if you changed your naming convention. It is possible to create a custom solution for it but it is just not a good idea because it would either be overly complicated or, if solved more lazily, it would be error prone. It is problematic to identify which are the relevant tiddlers because their prefix varies but, even worse, is that in order to sort it one would have to chop up the title and split out parts several times, since you have the date in a backward order from how you want it sorted. And you want it as a neat subfilter to feed into a ready made ToC macro... not doable.

So, as Riz says, better change the name to "yyyy.mm.dd - ..." or, ideally, use a separate field for the date.

<:-)

TonyM

unread,
May 17, 2020, 7:04:09 PM5/17/20
to TiddlyWiki
I would suggest using a separate independent and full date field (Serial).

If you know you will want to sort by dd.mm (very strange to me) then at the time you create the tiddler, accept the value of new date field and simultaneously add dd.mm to another field by which to sort in the future.

Regards
Tony

BirgitB

unread,
May 18, 2020, 3:20:54 PM5/18/20
to TiddlyWiki
Thanks to all of you!
I managed to create a list in chronological order. Not the way I had planned to it, but that is fine.


Am Sonntag, 17. Mai 2020 21:09:35 UTC+2 schrieb BirgitB:
Reply all
Reply to author
Forward
0 new messages