1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$start_date = get_field( 'start_date' ); $start_date= strtotime($start_date); $end_date = get_field( 'end_date',get_the_ID() ); $end_date= strtotime($end_date); $now=date('Y-m-d H:i'); $now=strtotime($now); if (($now >= $start_date) && ($now <= $end_date)){ echo "is between"; }else{ echo "NO GO!"; } |