Sample code for 30+ languages & platforms
Swift

Transition from Email.GetDt to Email.EmailDateStr

Provides instructions for replacing deprecated GetDt method calls with EmailDateStr.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    let email = CkoEmail()!

    // ...
    // ...

    // ------------------------------------------------------------------------
    // The GetDt method is deprecated:

    var dateTimeObj: CkoDateTime? = email.getDt()
    if email.lastMethodSuccess == false {
        print("\(email.lastErrorText!)")
        return
    }

    // ...
    // ...

    dateTimeObj = nil

    // ------------------------------------------------------------------------
    // Do the equivalent using EmailDateStr.

    let dt = CkoDateTime()!
    dt.set(fromRfc822: email.emailDateStr)

}