Discussion:
[tw] Days since modified
(too old to reply)
Stobot
2017-10-09 17:30:27 UTC
Permalink
Raw Message
Hello all,

I'm using TW5 for some project management and trying to more easily find
neglected projects. I have each Project have a tag "Projects", and each
task under that project has the Project Title as a tag to link them
together. The closest I've got is to return the actual modified field of
the most recent task for each project using:

\define lastmodifiedtask() <$list
filter="[all[current]tagging[]get[modified]sort[modified]last[1]]"/>
(used within another list widget of project names)

...but that returns the full numeric value like "20171003145311358" which
is hard to visually look at.

In order of preference:
1. Can I return just a number of how many days it's been since the date
provided? (6 for example)
2. If not, is there any way to format the returned number to parse out just
the month/day or something? (10/3 for example)
a. I see in <$view.../> I have some date formatting options, but can't
take the macro and put it in the view widget

Any help is greatly appreciated. Thanks!
--
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 ***@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/e451e1d3-b40e-452d-8989-4ba02456fe05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jed Carty
2017-10-09 17:48:01 UTC
Permalink
Raw Message
You can put the view widget in the macro.

\define lastmodifiedtask() <$list filter=
"[all[current]tagging[]get[modified]sort[modified]last[1]]"><$view formate=date
template='0dd/0mm'/></$list>

I made some macros to do this sort of thing here
http://ooktech.com/jed/ExampleWikis/DateMacros/ but they aren't made to
work with tiddlywiki timestamps. I should get around to updating that.
--
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 ***@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/f38f8e14-9586-4c3b-adf2-c31219aa6f08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stobot
2017-10-09 18:58:30 UTC
Permalink
Raw Message
Awesome!

Note for later for myself/others that find this: didn't work until adding
field=title within the <$view.../> section.

<$list
filter="[all[current]tagging[]get[modified]sort[modified]last[1]]"><$view
field=title format=date template="0MM-0DD"/></$list>
--
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 ***@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/1f3f7b04-e0db-4eb5-8ce8-34038bef2f82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...