Pat moment and full day

Is there a smart 'syntax' for pat moment if I have 'full day' ?
The following works OK, but it looks a bit strange for full day, since:

<span  class="pat-moment"
   data-pat-moment="format:DD.MM YYYY HH:mm;">${item/start}</span>

returns

02.04 2021 00:00

Basically, I just want to skip 00:00

What did you try that didn't work as expected?

Well, it works as expected, but maybe there is a pat-moment format that skips 'time' when it is '00:00' or maybe a tal condition could be used.

Does not make sense what your are asking.
If you specify a time format, the time will be displayed. Write custom code if you need this very special requirement done.

Or use tal:attributes to generate the data attribute with an inline if-else condition.

Did not find any 'sane tal conditions' and, so I ended up adding 'whole_day' to indexes.

Why is something like

tal:attributes="data-pat-moment python: 'format:DD.MM YYYY HH:mm' if some_condition else 'format:DD.MM YYYY' "

not working for you?

some_condition is an expression for `item.start that would check for the hours + minutes being zero...or something similar...

:roll_eyes: :roll_eyes: :roll_eyes:

I have no problems with putting a conditions on it, in fact that is what I asked for before you answered the first time.

Finding out what the difference with something starting at 00:00 (midnight (?)) or 'being a full day' was confusing , so I added an index and used condition

item.whole_day == "False"  

showing
data-pat-moment="format:DD.MM.YYYY">

and True

data-pat-moment="format:DD.MM.YYYY - HH:mm;">

Since it is also possible to have "open end" and have start and end on different days I am not sure what 'math to use in a condition'