extension String {
func convertStringDateToTimeStamp(_ dateFormat: String) -> Int? {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = dateFormat
let date = dateFormatter.date(from: self)
if let date = date {
let timeStamp = Int(date.timeIntervalSince1970 * 1000)
return timeStamp
}
return nil
}
}