1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-02 02:03:14 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/filters/examples/days.tid
Thomas Elmiger 489f9a0079 days filter – docs and examples optimisations (#2972)
* Replacement icon stopwatch on

As discussed in issue #2690

* Replacement icon stopwatch off

As discussed in issue #2690

* Added missing tag "Resources" (Community Resource)

* Tried to make a sentence clearer

CamelCase words are NOT joined with hyphens (copy-paste error?). 
Copied "directly" from the line below to make the meaning even clearer.

* Does deleting make the conflict go?

* Recreate deleted file with updated text

* days filter example should show highlights

- show a highlight using a longer timespan (180 days)
- added a second highlight to demo timespan with start AND end in the past
- better readability

* days Operator explanation optimisations

- typo
- readability (explain { positive | negative } first; remove duplication)

* Remove additional blank line

* Remove whitespace after save button

When the save button was not the last edit button (tested by moving to another place via control panel > Appearance > Toolbars > Edit Toolbar by drag-and-drop) then we got additional spacing due to whitespace in the resulting HTML after the button. This is a fix for that, I discovered while developing additional edit buttons.
2017-09-16 15:29:44 +01:00

21 lines
756 B
Plaintext

tags: [[Operator Examples]] [[days Operator]]
title: days Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[days[-14]]" "tiddlers modified within the last 14 days">>
<<.operator-example 2 "[!days:created[-800]]" "tiddlers created more than 800 days ago">>
The filter can be used to highlight new items in a list. For example:
<$macrocall
$name="wikitext-example-without-html" src=
"""
<ul>
<$list filter="[tag[ReleaseNotes]!<currentTiddler>!sort[modified]]">
<li>
<$link><$view field="title"/></$link>
<$list filter="[<currentTiddler>days[-180]]"> @@color:red;^^new^^@@</$list>
<$list filter="[<currentTiddler>days[-500]!days[-180]]"> @@color:black;^^recent^^@@</$list>
</li>
</$list>
</ul>
"""/>