Support

Account

Home Forums Front-end Issues Is my date in future ? Reply To: Is my date in future ?

  • This should work:

    
    <?php 
    $endOfDay = strtotime("tomorrow") - 1;
    $unixtimestamp = strtotime(get_field('date_de_sortie_fr'));
    $date_fr = date("Y-m-d", $unixtimestamp);
    echo  $unixtimestamp > $endOfDay ? "soon" : $date_fr;

    EDITED: Syntax Error