Get date to Expiry date

Get date to Expiry date

by Stephen Be23q -
Number of replies: 1

Hi All,


I have a simple QQ for someone with php knowledge.

How can I make the Expiry date variable shown below in the certificate.php appear with a date 2 years later of record?

Thanks


certificate_print_text($pdf, $x, $y + 275, 'C', 'Helvetica', '', 14, certificate_get_date($certificate, $certrecord, $course));

Average of ratings: -
In reply to Stephen Be23q

Re: Get date to Expiry date

by Stephen Be23q -

Edit:


      $timetoadd = 730 * 24 * 60 * 60; // A year in seconds
$expdate = $certrecord->timecreated + $timetoadd;
certificate_print_text($pdf, $x, $y + 275, 'C', 'Helvetica', '', 14, "Expiration Date: " . date("F d, Y", $expdate));


^^ Answer found and worked