Folks,
I am hopping to expand the documentation on the days operator on TiddlyWiki.com, in this case I do not understand it myself, So I am reaching out to the community. Have you worked it out yourself, can you provide some information to help.
Could someone please Expand the Documentation to better document its function including giving examples of each +ve -ve and ! combinations and ideally a range.
I have not worked it out properly yet, but here are some details of what to include
And using two days operators to
Thanks in advance
Name | Relative/reference date | "days[N]" | "!days[N]" | Only |
---|---|---|---|---|
Yesterday | days[-1] | days[-1] Yesterday and all days into the future |
!days[-1] Yesterday and all days into the past |
Yesterday only days[-1]!days[-1] XXX |
Today | days[0] | days[0] Today only |
!days[0] Not today (all other days) |
Today only days[0] |
Tomorrow | days[+1] | days[+1] Tomorrow and All days in the past |
!days[+1] Tomorrow and all days in the future |
Tomorrow only days[+1]!days[+1] XXX |
A past day | days[-7] | days[-7] 7 days ago and all days in the future |
!days[-7] 7 days ago and all days in the past |
A past day only days[-7]!days[-7] XXX |
A future day | days[+7] | days[+7] 7 days ahead and all days in the past |
!days[+7] 7 days ahead and all days in the future |
A future day only days[+7]!days[+7] XXX |
Name | Relative/reference date | "days[N]" | "!days[N]" | Notes |
---|---|---|---|---|
A Range of Dates | ||||
"Yesterday is -1
<ul>
<$list filter="[has[due]days:due[60]days:due[-60]!sort[due]]">
<li>
<$link><$view field="title"/></$link>
<$list filter="[<currentTiddler>days:due[15]!days:due[2]]"> @@color:beige;^^upcoming^^@@</$list>
<$list filter="[<currentTiddler>days:due[1]days:due[-1]]"> @@color:red;^^today^^@@</$list>
<$list filter="[<currentTiddler>days:due[-7]!days:due[-2]]"> @@color:black;^^recent^^@@</$list>
<$list filter="[<currentTiddler>days:due[-60]!days:due[-30]]"> @@color:yellow;^^over a month^^@@</$list>
</li>
</$list>
</ul>
days:due[0]days:due[0]]
but that didn't work.days:due[1]days:due[-1]` is the intersection of "tomorrow and anything older" and "yesterday and anything newer". Today is just `days:due[0]`. Now please have a look at this issue
https://github.com/Jermolene/TiddlyWiki5/issues/2061 and you'll realize that this filter is of limited usability because of how TW handles dates. `days:due[0]` shows tiddlers that are due "today in UTC". For me in PST, that means at 5PM it starts returning tomorrow's date as "today". This shift applies to
`days:due[1]days:due[-1]` as well, and any other use of `days` filter.