Hey Robin, hey Mark, hey John,
it’s very likely you all got it right: it is a third party thing. Brandon from P&T pointed me to the respective table in the database where the matrix data is stored. In fact all dates from the date fields (real native EE date formats) are stored in UNIX time format there.
Still, I’d like to explain what I’m trying to achieve with the code. I use Matrix fields to store three things per column:
1. A relationship to another article via Playa field.
2. a date_from (the date the relationship = teaser/ad is output on the website)
3. a date_to (the date the relationship = teaser/ad disappears from the website output again).
This way the editor has full control over teaser/ad planning and can use the matrix field to plan well ahead.
There is two conditions I’m checking for per date column:
a) is the date_from/date_to column empty (this should mean: “the teaser is valid endlessly”)
b) is the date_from “smaller” than the current_time/is the date_to “bigger” than the current_time (in this case a specific start-date/end-date for the teaser is set)
Thing is: a) works, b) works, but only solemnly :-(
Here is some sample code ...
Works:
{my_matrix_field
search:date_from=""
search:date_to="" limit="3"}
{teaser}
{/my_matrix_field}
Works:
{my_matrix_field
search:date_from="<={current_time}"
search:date_to=">={current_time}"}
{teaser}
{/my_matrix_field}
Worksn’t 😉 :
{my_matrix_field
search:date_from="|<={current_time}"
search:date_to="|>={current_time}"}
{teaser}
{/my_matrix_field}
Doesn’t work either:
{my_matrix_field
search:date_from="<={current_time|}"
search:date_to=">={current_time}|"}
{teaser}
{/my_matrix_field}
Doesn’t work either:
{my_matrix_field
search:date_from="<={current_time}|IS_EMPTY"
search:date_to=">={current_time}|IS_EMPTY"}
{teaser}
{/my_matrix_field}
Doesn’t work either:
{my_matrix_field
search:date_from="IS_EMPTY|<={current_time}"
search:date_to="IS_EMPTY|>={current_time}"}
{teaser}
{/my_matrix_field}