Int
public extension Int
Int+TimeFormattable is used to format a number into time span string.
Version
1.5.0Date
30/03/2019-
Convert the number into time span string. Such as “3 Hrs”.
Declaration
Swift
func timeString(withPrecision precision: Int = Self.max, withAbbreviation shouldUseAbbreviation: Bool = false) -> String
Parameters
precision
How many units should be included.
shouldUseAbbreviation
Whether the time description should be abbreviation or not.
Return Value
The time span string.