//
//  DateExtension.swift
//  SodaLive
//
//  Created by klaus on 2022/05/27.
//

import Foundation

extension Date {
    func convertDateFormat(dateFormat: String = "yyyy.MM.dd") -> String {
        let formatter = DateFormatter()
        formatter.dateFormat = dateFormat
        formatter.locale = Locale(identifier: "ko")
        return formatter.string(from: self)
    }
    
    func currentTimeMillis() -> Int64 {
        return Int64(self.timeIntervalSince1970 * 1000)
    }
}
