Show "today" when event is today instead of date

I use this code for the event / calendar widget.

$df(EEE dd. MMM hh:mm,
ci(start, 0))$

[b]$ci(title, 0)$[/b]

But when the event is today it shouldn't show the date. At this day it should show "Today" and when event is on the next day "Tomorrow"

Use this:

$if(df(D) = df(D, ci(start,0)), Today, df(D, a1d) = df(D, ci(start,0)), Tomorrow, df(EEE dd. MMM hh:mm, ci(start, 0))$

Which translates to:

  • If day of the year of today (D) is the same as day of the year of the event write Today
  • Otherwise, if day of the year of today (D) plus one day (a1d) is the same as day of the year of the event write Tomorrow
  • Otherwise write the date as you wrote it

Error: parantheses mismatched

Edit:

i got it.

there is a ) missing after hh:mm.

corrected:

$if(df(D) = df(D, ci(start,0)), Today, df(D, a1d) = df(D, ci(start,0)), Tomorrow, df(EEE dd. MMM hh:mm), ci(start, 0))$

thank you Frank Monza.

You really helped me so fast ! thanks for quick support.

how do i get it for the second event in the calendar?

editing ci(start, 0) to ci(start, 1) doesnt work.

ci(start, 1) is the second event, if its not showing means that you dont have any in the next 30 days

i have a second event at 02. June 2017

but the code destroys the Format

EEE dd. MMM hh:mm

(see my new screenshot...)

now there is: 2017y06M02d12h00mm00s

solved it:

moved the ) after hh:mm to the end.

now it works.

Now i want to add the event time (hh:mm) behind "Today" and "Tomorrow" .

any ideas?

ok, i got it .

simply add $df(hh:mm, ci(start,0))$ to the end and remove it in the if-sentence ^^

Can you say how the code looks when tomorrow should be in color blue?

Anyone ever figure this out?