mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
20 lines
376 B
Swift
20 lines
376 B
Swift
//
|
|
// Date.swift
|
|
// Meshtastic
|
|
//
|
|
// Copyright(c) Garth Vander Houwen 4/25/23.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension Date {
|
|
static var currentTimeStamp: Int64 {
|
|
return Int64(Date().timeIntervalSince1970 * 1000)
|
|
}
|
|
|
|
func formattedDate(format: String) -> String {
|
|
let dateformat = DateFormatter()
|
|
dateformat.dateFormat = format
|
|
return dateformat.string(from: self)
|
|
}
|
|
}
|