Sample code for 30+ languages & platforms
Swift

Transition from ZipEntry.GetDt to ZipEntry.FileDateTimeStr

Provides instructions for replacing deprecated GetDt method calls with FileDateTimeStr.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    let entry = CkoZipEntry()!

    // ...
    // ...

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

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

    // ...
    // ...

    dtObj = nil

    // ------------------------------------------------------------------------
    // Do the equivalent using FileDateTimeStr.

    let dt = CkoDateTime()!
    dt.set(fromRfc822: entry.fileDateTimeStr)

}