Is there a way to make a formula for ci() functions that will return events for "today" or "tomorrow"?

Hi all,

I'm pretty new to kwgt, but I dig it. Big Tasker user, but kwgt takes things to a whole new level.

I'm trying to create a widget that lists meeting events for today or tomorrow only.

What I'm trying to do here is to check if the next 4 events start today or tomorrow, and make them visible if they do, or invisible if they start 2 days or more from today.

$if(df(D) = df(D, ci(start, e0, a0d)) | df(D) = df(D, ci(start, e0, a1d)), always, remove)$
$if(df(D) = df(D, ci(start, e1, a0d)) | df(D) = df(D, ci(start, e1, a1d)), always, remove)$
$if(df(D) = df(D, ci(start, e2, a0d)) | df(D) = df(D, ci(start, e2, a1d)), always, remove)$
$if(df(D) = df(D, ci(start, e3, a0d)) | df(D) = df(D, ci(start, e3, a1d)), always, remove)$

It seems to work ok for events that are scheduled for today, but not for tomorrow.

Any suggestions?

Thanks a ton!


Tomorrow is not $df(D)$ but $df(D) +1$, so your first formula should be:

$if(df(D) = df(D, ci(start, e0, a0d)) | (df(D) + 1) = df(D, ci(start, e0, a1d)), always, remove)$

I use:

• $if((ci(allday, 0)=1),df(EEE dd MMM,ci(start,0))+“: “+ci(title, 0),df(EEE dd MMM, ci(start,0))+ " @”+df( hh:mm, ci(start, 0))+” - “+df(hh:mm, ci(end, 0))+” "+ci(title, 0))$

• $if((ci(allday, 1)=1),df(EEE dd MMM,ci(start,1))+“: “+ci(title, 1),df(EEE dd MMM, ci(start,1))+ " @”+df( hh:mm, ci(start, 1))+” - “+df(hh:mm, ci(end, 1))+” "+ci(title, 1))$

• $if((ci(allday, 2)=1),df(EEE dd MMM,ci(start,2))+“: “+ci(title, 2),df(EEE dd MMM, ci(start,2))+ " @”+df( hh:mm, ci(start, 2))+” - “+df(hh:mm, ci(end, 2))+” "+ci(title, 2))$

These go in a stack group and show the next three upcoming events. They go through your upcoming calendar events and display them using the colours in your calendar so they differentiate between birthdays, events and holidays for example. You can stack them as high as you want, I do it so I can see the next 30 events.

It also has a slightly different display for all-day events which only show the date, and appointment events which show start and end time.