Dave,
Dates are quite complex, centuries with missing leap days and more. You
need to make use of special date handling widgets and operators to do this
correctly for all but the simplest comparison. The days operator is one of
these, but other plugins exist to support this, eg Date Picker.
Personally I like to timestamp a field with now, say the weekly-review
field, because I did it, then have a seperate list widget use the days
operator to list all tiddlers with the weekly-review field older than 7
days, meaning it was not done this week.
Now you can think there is another way, but this advice comes from me
spending weeks of developing date handling in tiddlywiki so unless you use
more advanced date functions in say evans formulae plugin I recommend you
try and wrap your head around this conceptual somersault. I believe you
will be rewarded in the long run and any other approach may make your head
hurt.
Regards
Tony
On Monday, November 25, 2019 at 4:22:54 PM UTC+11, Dave wrote:
>
> I have this list filter to list tiddlers due in Nov and Dec
> <$list filter="[field:due/^2019(1|2)/]+[!sort[due]]">
> <$link to={{!!title}}><$view field="title"/></$link> - <$view
> field="due"/><br>
> </$list>
>
> that gives something like this
>
> some other event - 20191227
> Christmas - 20191225
> some event - 20191220
> Haircut - 20191203
> vets - 20191125
> do registration - 20191101
> refill hydrocollator - 20191028
> Put words in rm - 120191017
> research windows den - 20191005
>
> In each of these tiddlers there's a field "due" with the yyyymmdd
> formatted date.
>
> I also have a tiddler "mynow" with today's date in the same format.
>
> If the months are the same, I can just subtract the numbers, e.g. with
> something like this
> <<calc !!due - by:mynow!!mynow>> days
>
>
> using Tobibeer's macro, but if they're different months, 20191201-20191130
> does not equal "1"
>
> Is there a method that can do this? I've seen similar topics here, but
> nothing so far seems to answer this particular problem.
>
> Thanks,
> - Dave
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/e1204d4b-4fa0-4712-876c-896061925cfb%40googlegroups.com.