123456789101112131415161718192021222324 |
- //
- // Date+Ex.swift
- // TSLiveWallpaper
- //
- // Created by 100Years on 2024/12/20.
- //
- extension Date {
- private static var HmsFormatter: DateFormatter {
- let formatter = DateFormatter()
- formatter.dateFormat = "HH:mm:ss:SSS"
- formatter.locale = Locale(identifier: "en")
- return formatter
- }
-
- static var hmsString: String {
- return HmsFormatter.string(from: Date())
- }
-
- static var timestampString: String {
- return String(Int(Date().timeIntervalSince1970))
- }
- }
|