Believe it or not. I was busy with this matter since this morning. I tried all tricks, but no luck yet!
I could not change the format of the {date_start}, but it is not very important at the moment.
Here we go again:
{date_start} and {date_end} are TYPE: Date.
The dates are showing in the details.html, but {date2} and {date3} NOT!!!
Do you have to change/add something in the code?
if (isset($image_row['date_start']) && !empty($image_row['date_start']) && isset($image_row['date_end']) && !empty($image_row['date_end'])) {
$image_start_date = $image_row['date_start'];
$image_end_date = $image_row['date_end'];
if (preg_match("/(\d{2})-(\d{2})-(\d{4})/", $image_start_date, $start)) {
if (preg_match("/(\d{2})-(\d{2}-(\d{4}))/", $image_end_date, $end)) {
if ($start[1] > date("d")) {
$image_real_date_today = $start[1] - date("d");
} elseif ($start[1] < date("d")) {
$image_real_date_today = date("d") - $start[1];
} elseif ($start[1] == date("d")) {
$image_real_date_today = $start[1];
} elseif ($end[1] > date("d")) {
$image_real_date_today = $end[1] - date("d");
} elseif ($end[1] < date("d")) {
$image_real_date_today = date("d") - $end[1];
} elseif ($end[1] == date("d")) {
$image_real_date_today = date("d") - $end[1];
}
$image_real_date_end_start = $end[1] - $start[1];
}
}
}
"date2" => (isset($image_real_date_end_start)) ? $image_real_date_end_start : "",
"date3" => (isset($image_real_date_today)) ? $image_real_date_today : "",
See screenshot please!