If there is cause to keep them as string, can you at least add this function to easily grab Date when needed?
public var createdDate: Date {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
return dateFormatter.date(from: self.createdAt) ?? Date()
}
Is there a particular reason why the
createdAt
andupdatedAt
timestamps are strings?https://github.com/pusher/chatkit-swift/blob/b81a9b04a043c52b2d5e85b06c51b2874a462fcd/Sources/PCMessage.swift#L6
If there is cause to keep them as string, can you at least add this function to easily grab Date when needed?