MoviaBox/ShortPlay/Base/Extension/Int+SPAdd.swift
2025-04-17 15:40:53 +08:00

31 lines
552 B
Swift

//
// Int+SPAdd.swift
// ShortPlay
//
// Created by on 2025/4/17.
//
import UIKit
class Int_SPAdd: NSObject {
}
extension Int {
func formatTimeGroup() -> (String, String, String) {
let seconds = self
var s: String = "00"
var m: String = "00"
var h: String = "00"
s = String(format: "%02d", Int(Int(seconds) % 60))
m = String(format: "%02d", Int(seconds / 60) % 60)
h = String(format: "%02d", Int(seconds / 3600))
return (h, m, s)
}
}