(PHP Extension) Transition from Email.GetDt to Email.EmailDateStr
Provides instructions for replacing deprecated GetDt method calls with EmailDateStr. Note: This example requires Chilkat v11.0.0 or greater.
<?php
include("chilkat.php");
// Use "chilkat_9_5_0.php" for versions of Chilkat < 10.0.0
$email = new CkEmail();
// ...
// ...
// ------------------------------------------------------------------------
// The GetDt method is deprecated:
// dateTimeObj is a CkDateTime
$dateTimeObj = $email->GetDt();
if ($email->get_LastMethodSuccess() == false) {
print $email->lastErrorText() . "\n";
exit;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using EmailDateStr.
$dt = new CkDateTime();
$dt->SetFromRfc822($email->emailDateStr());
?>
|