Sample code for 30+ languages & platforms
Ruby Requires Chilkat v11.0.0+

Transition from Cert.GetValidToDt to Cert.ValidToStr

Provides instructions for replacing deprecated GetValidToDt method calls with ValidToStr.

Chilkat Ruby Downloads

Ruby
require 'chilkat'

cert = Chilkat::CkCert.new()

#  ------------------------------------------------------------------------
#  The GetValidToDt method is deprecated:

# ckdt1 is a CkDateTime
ckdt1 = cert.GetValidToDt()
if (cert.get_LastMethodSuccess() == false)
    print cert.lastErrorText() + "\n";
    exit
end

#  ...
#  ...

#  ------------------------------------------------------------------------
#  Do the equivalent using the ValidToStr property

ckdt2 = Chilkat::CkDateTime.new()
ckdt2.SetFromRfc822(cert.validToStr())