Hey Mark,
Acrobatics for me and child's play for, but I'm learning. Tried you're code
with a little modification and it outputs exactly what I want. Here's what
I did:
\define date-str(date)
<$list filter="[[$date$]splitbefore[-]]" variable=x >
<$list filter="[[$date$]removeprefix<x>splitbefore[-]removesuffix[-]]"
variable=m>
<$list filter="[[data-months]getindex<m>]" />
<$list filter="[[$date$]splitbefore[-]removesuffix[-]]" variable=y >
<$list filter="[[$date$]removeprefix<x>removeprefix<m>removeprefix[-]]"
variable=d >
<<d>>, <<y>>
</$list>
</$list>
</$list>
</$list>
\end
I did change some of the variable names a bit. The last question I have is
this. The month comes out as a missing tiddler. Is there a way that I can
just have that be text?
Thanks again,
Damon
On Friday, February 1, 2019 at 2:43:05 PM UTC-7, Mark S. wrote:
>
> Here's some acrobatics:
>
> \define mo-str(date)
> <$list filter="[[$date$]splitbefore[-]]" variable=y >
> <$list filter="[[$date$]removeprefix<y>splitbefore[-]removesuffix[-]]"
> variable=m>
> <$list filter="[[data-months]getindex<m>]"/>
> </$list>
> </$list>
> \end
>
> <$macrocall $name="mo-str" date={{!!mydate}}/>
>
> Assuming date is exactly formatted like 2018-01-02 and
>
> Where
> "data-months" is a data dictionary mapping numbers 01 ... 12 to months
> Jan... Dec, or whatever language you prefer.
>
> Have fun,
> -- Mark
>
> On Friday, February 1, 2019 at 11:42:50 AM UTC-8, Damon Pritchett wrote:
>>
>> Mark,
>>
>> In reality, all I really need is sortability and the filtering down to
>> the year. So the roll your own method will suit those needs. However, what
>> I’d like to be able to do is to display the dates with words for the months
>> rather than numbers without having to do acrobatics to do so. Maybe that’s
>> not currently possible.
>>
>> Damon
>
>
--
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/4db8d3f0-de03-462d-8634-fe5ed8fae095%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.