no message

This commit is contained in:
Peter
2017-06-06 13:13:26 +03:00
parent d55e3da7b3
commit b8230a4fdb
397 changed files with 28757 additions and 6756 deletions

View File

@@ -20,3 +20,17 @@ public func compactNumericCountString(_ count: Int) -> String {
}
}
func timeIntervalString(strings: PresentationStrings, value: Int32) -> String {
if value < 60 {
return strings.MessageTimer_Seconds(value)
} else if value < 60 * 60 {
return strings.MessageTimer_Minutes(value / 60)
} else if value < 60 * 60 * 24 {
return strings.MessageTimer_Hours(value / (60 * 60))
} else if value < 60 * 60 * 24 * 7 {
return strings.MessageTimer_Days(value / (60 * 60 * 24))
} else {
return strings.MessageTimer_Weeks(value / (60 * 60 * 24 * 7))
}
}