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!



On Thursday, July 22, 2021 at 7:28:33 AM UTC+4:30 TW Tones wrote:

> 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 <https://tiddlywiki.com/#DateFormat> as 
> barro said, or with the more recent versions the format operator  
> <https://tiddlywiki.com/#format%20Operator> 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 
> <https://tiddlywiki.com/prerelease/#Filter%20Parameter>. For example: 
> [<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>].  
>
> Regards
> Tones
>
>>
>>>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/66d2a602-ad16-4fe2-95f5-31bc19603819n%40googlegroups.com.

Reply via email to