On Thursday, June 17, 2021 at 6:27:18 AM UTC-7 Euthymious wrote:

> No, I mean finding a day, when the largest number of tiddlers were created.
> I guess, I should somehow pass the output of all those  
> [sameday<currentTiddler>count[]] to [maxall[]] but can't figure out how.
>

Try this:
\define getCounts()
<$list filter="[!is[system]eachday[created]get[created]]">
{{{ [sameday<currentTiddler>count[]pad[3]] }}};<<currentTiddler>><br>
</$list>
\end

<$wikify name="countlist" text=<<getCounts>>>
On {{{ [enlist<countlist>sort[]last[]split[;]rest[]] }}} {{{ 
[enlist<countlist>sort[]last[]split[;]first[]trim[0]] }}} tiddlers were 
created<br>
</$wikify>

Notes:
1) Just like your in original code, the getCounts() macro produces a list 
of each day and the number of tiddlers created for that day
2) However, the output is formatted as "count;date", where the count is 
zero-padded to 3 digits so all count values are the same number of 
characters
3) The <<getCounts>> macro is passed to $wikify to capture its *output* in 
a variable named "countlist"
4) Then, using filtered transclusion, enlist[] the captured output, sort[] 
it in ascending order (i.e., by the 3 digit "count" value) and get the last 
item (i.e., the one with the largest count value)
5) To produce the date output, you split[] the last item at the ";" 
separator and use rest[] to get the date
6) To produce the count output, you split[] the last item at the ";" 
separator and use first[] to get the count, trimmed to remove any zero 
padding

enjoy,
-e

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d20fe14a-8dcb-4683-bf17-dcc3dbf785b6n%40googlegroups.com.

Reply via email to