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
Post a Comment