\define gt() $(TidA)$ $(TidB)$ +[nsort[]last[1]remove[$(TidB)$]]\end
\define is-it-newer(TiddlerA, TiddlerB)<$set name=TidA tiddler=<<__TiddlerA__>> field="modified"><$set name=TidB tiddler=<<__TiddlerB__>> field="modified"><$list filter=<<gt>> emptyMessage="no">yes</$list></$set></$set>\end
> <<is-it-newer Aa Bb>>
> <$wikify text=<<is-it-newer Aa Bb>> name=result><<result>></$wikify>
yes
no
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/fc215b27-126d-4bde-a942-30daa70acd26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<$wikify text="""<<is-it-newer Aa Bb>>""" name="result"><<result>>
<$reveal type="match" text="yes" default=<<result>> >Yes, Aa is newer</$reveal><$reveal type="match" text="no" default=<<result>> >No, Aa is older</$reveal></$wikify>
Hi BTC,Thanks it works! but then if I further use the result I go into another trouble.
No check this!
<$wikify text="""<<is-it-newer Aa Bb>>""" name="result"><<result>><$reveal type="match" text="yes" default=<<result>> >Yes, Aa is newer</$reveal><$reveal type="match" text="no" default=<<result>> >No, Aa is older</$reveal></$wikify>
No output!
\define gt() $(TidA)$ $(TidB)$ +[nsort[]last[1]remove[$(TidB)$]]\end
\define is-it-newer(TiddlerA, TiddlerB)<$set name=TidA tiddler=<<__TiddlerA__>> field="modified"><$set name=TidB tiddler=<<__TiddlerB__>> field="modified"><$list filter=<<gt>> emptyMessage="no">yes</$list></$set></$set>\end
> <<is-it-newer Aa Bb>>
<$wikify text="""<<is-it-newer Aa Bb>>""" name="result"><<result>><$reveal type="match" text="yes" default=<<result>> >Yes, Aa is newer</$reveal><$reveal type="match" text="no" default=<<result>> >No, Aa is older</$reveal></$wikify>
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/a67a9527-5835-4694-b30a-c6ba5385d97f%40googlegroups.com.
--
<$set name="tidBMod" value={{{ [[Bb]get[modified]] }}}><$set name="tidAMod" value={{{ [[Aa]get[modified]] }}}><$reveal type="match" text="yes" default={{{ [<tidAMod>] [<tidBMod>] +[nsort[]last[1]remove<tidBMod>addprefix[yes]removesuffix<tidAMod>] ~[[no]] }}}>
Yes, Aa is newer</$reveal>
<$reveal type="match" text="no" default={{{ [<tidAMod>] [<tidBMod>] +[nsort[]last[1]remove<tidBMod>addprefix[yes]removesuffix<tidAMod>] ~[[no]] }}}>
No, Aa is older</$reveal>
</$set></$set>
BTC,Thank you, now it works and reveal widget shows the correct output!It is difficult to debug the TW scripts! Seem only experiences help here!
A smart solution!Much shorter and semantic!Thanks alot!Added to TW-Scripts
A smart solution!Much shorter and semantic!
<$set name="tidBMod" value={{{ [[Bb]get[modified]] }}}><$set name="tidAMod" value={{{ [[Aa]get[modified]] }}}>
<$list filter="[<tidAMod>] [<tidBMod>] +[nsort[]last[1]removesuffix<tidAMod>]">Yes, Aa is newer</$list><$list filter="[<tidAMod>] [<tidBMod>] +[nsort[]last[1]removesuffix<tidBMod>]">No, Aa is older</$list></$set></$set>