Support

Account

Home Forums General Issues If DatePicker date is less than 1 year old Reply To: If DatePicker date is less than 1 year old

  • Ah! Thank you. That helped me figure it out. Here is my solution to show a dot if file is less than 6 months old:

    
    $age = strtotime( get_sub_field('file_date'));
    $now = strtotime("now");
    
    <span class="age"><?php if ($now - $age < 15778800) { echo "<i class='fas fa-circle'></i>"; }?></span>