tidders created this week

186 views
Skip to first unread message

paulgilbert2000

unread,
Jul 20, 2021, 1:48:22 PM7/20/21
to TiddlyWiki
Hi ,

is it possible to list all tiddlers created this week, that would include past tiddlers  created
yesterday"Monday" , tiddlers created today " Tuesday". and future tiddlers to be created in Wednesday ,Thursday and Friday.

i know i can use something like this
{{{[all[tiddlers]] :filter[get[created]compare:date:gt[20210719]]}}}

but then the date i am comparing against is static, and will need to be changed manually every week

I really like it , if only the date can be replaced with some kind of dynamic value that is defined as the first day of the current week

i know there is the days operator IE , [days[-1]]  , but then again its not what i want and will also need manual adjustment every day

is there any easy way around this ?

thanks in advance

A Gloom

unread,
Jul 21, 2021, 2:07:20 AM7/21/21
to TiddlyWiki
I'm thinking of the  SO-8601 week number of year of one the date formats ( https://tiddlywiki.com/#DateFormat ) which would allow working with actual calendar weeks.  Does filter operators and search work with the different date formats or would week number have to be an user created field for the filter operators to work with.

paulgilbert2000

unread,
Jul 21, 2021, 12:12:08 PM7/21/21
to TiddlyWiki
Hi,

not exactly following , can you please clarify more what you mean?

TW Tones

unread,
Jul 21, 2021, 10:58:33 PM7/21/21
to TiddlyWiki
Mohamad,

Yes, I have used the days(-7) before but that is a sliding last 7 days. useful in its own right, but not always what you want.

Consider using the view date format as barro said, or with the more recent versions the format operator  including titlelist in prerelease 

<$view field=due format=date template="0WW"/>

WW ISO-8601 week number of year 0WW Adds a leading zero
  • Thus for any given date you can place it in a particular week, 
  • list all with a date in the same week including current week - 1 for last week, or +1 for next week
  • Once you have a week of tiddlers you can use 
    • DDD Day of week in full (eg, "Monday")
    • ddd Short day of week (eg, "Mon")
The following works for modified and non-system tiddlers, on 5.1.23, I am not sure why other variations such as system tiddlers and created date do not list in DOW order, it should be the same.

<$set name=this-week value=<<now 0WW>> >
<$set name=last-week filter="[<this-week>subtract[1]]" >

this-week=<<this-week>> last-week=<<last-week>>

;Modified last week
<$list filter="[all[tiddlers]!is[system]has[modified]sort[modified]]">
   <$list filter="[all[current]get[modified]format:date[0WW]match<last-week>]" variable=last-week-number>
        <$text text={{{ [all[current]get[modified]format:date[DDD]] }}}/> <$link/><br>
   </$list>
</$list>

</$set></$set>

From the pre-release this feature should make it even simpler
 New in: 5.2.0 Literal macro parameters are supported. For example: [<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>].  

Regards
Tones



Soren Bjornstad

unread,
Jul 22, 2021, 7:59:34 AM7/22/21
to TiddlyWiki
On Wednesday, July 21, 2021 at 9:58:33 PM UTC-5 TW Tones wrote:
From the pre-release this feature should make it even simpler
 New in: 5.2.0 Literal macro parameters are supported. For example: [<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>].

Ooh, that's slick, looking forward to it!

Stobot

unread,
Jul 22, 2021, 2:00:59 PM7/22/21
to TiddlyWiki
WOW - agree with Soren, this is HUGE - this will remove the need for sooo many <$wikify> widgets!

paulgilbert2000

unread,
Jul 24, 2021, 11:58:23 AM7/24/21
to TiddlyWiki
this worked perfectly , thank you very much tones!

Mohammad

unread,
Nov 21, 2021, 6:20:07 AM11/21/21
to TiddlyWiki
Hi @Tones
 Does your solution work for first week of year? I think you have to store full date and check if the week is the first week of year!
Reply all
Reply to author
Forward
0 new messages