Key dates
Please take note of these important upcoming dates in the financial calendar
'_wp_page_template',
'meta_value' => 'page-dates.php'
));
foreach($pages as $page){
$datesPageId = $page->ID;
}
$dates = get_field('key_dates', $datesPageId);
function compare_func($a, $b){
$t1 = strtotime($a["date"]);
$t2 = strtotime($b["date"]);
return ($t1 - $t2);
}
usort($dates, "compare_func");
$count=0;
$now = time();
foreach($dates as $date){
if(strtotime($date['date']) > $now && $count < 3){
$count++;
$d = explode('/', $date['date']);
$monthNum = $d[1];
$dateObj = DateTime::createFromFormat('!m', $monthNum);
$monthName = $dateObj->format('F'); // March
echo "
".(int)$d[2]." $monthName ".$d[0]."
".$date['event']."
";
}
}*/
?>
No upcoming dates right now.
See All Dates