I'm making a TiddlyWiki where some of the tiddlers contain the following
fields: `age` `year` `month` `date` corresponding to the date of the
tiddler in a fictional universe (hence I can't use the existing date
fields, the calendar is different).
I have this code that creates a list and sorts tiddlers more or less
correctly by `age`, `year`, `month`, `date` in that order:
<$list filter="[tag[history]] [tag[progress]]
+[!sort[date]!sort[month]!sort[year]!sort[age]]">
<$link>{{!!title}}</$link> | <span style="font-weight:
bold;">Age:</span> {{!!age}} <span style="font-weight: bold;">Year:</span>
{{!!year}} <span style="font-weight: bold;">Month:</span> {{!!month}} <span
style="font-weight: bold;">Date:</span> {{!!date}}<br>
</$list>
But when I have a field that is say `month:11` it gets sorted after
`month:1` and before `month:2` because it's being evaluated and sorted as
text.
So my question comes down to how can I force `sort[]` to treat its
parameter like an integer, or how can I tell TiddlyWiki what kind of data
I'm storing in my custom fields?
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/7cdb4671-4ef5-44af-97cb-9c3595c37d89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.