javascript - comparing two date and creating output -


i have 2 field named creation_date , expiry_date. want create row on table name status, if user has passed expiry date output must expired , if user haven't passed expiry date output must active

<th>     <div>         <?php echo get_phrase('status');?>     </div> </th>  <td>         <div class="badge badge-<?php if ($expiry_date < $creation_date) {     echo 'still active';     }     else      if ($expiration_date == $creation_date) {     echo 'still active';     }      else {     echo 'time expired';     };?>">     </div>     <?php echo $row['status'];?> </td> 

dont create such field incorrect unless run job update status field every few minutes.

make staus check dynamic doing data comparison mention whenever need know if status expired.


Comments

Popular posts from this blog

asp.net mvc - Cannot display error message on Editor or EditorFor -

Reliable way to get Windows Version from registry -

python - No exponential form of the z-axis in matplotlib-3D-plots -