MoviaBox/Thimra/Base/Extension/Int+SPAdd.swift
2025-04-21 14:30:28 +08:00

31 lines
549 B
Swift

//
// Int+SPAdd.swift
// Thimra
//
// 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)
}
}