Browse Source

Localization.

pull/92/head
Abhishek 4 years ago
parent
commit
966add5e67
  1. 8
      Clocker/Panel/Data Layer/TimezoneDataOperations.swift

8
Clocker/Panel/Data Layer/TimezoneDataOperations.swift

@ -52,11 +52,15 @@ extension TimezoneDataOperations {
// We'd like to show upcoming DST changes within the 7 day range.
// Using 8 as a fail-safe as timezones behind CDT can sometimes be wrongly attributed
if numberOfDays > 8 || numberOfDays <= 0 {
if numberOfDays > 8 || numberOfDays < 0 {
return nil
}
return "Daylight Savings transition will occur in \(numberOfDays) days!"
let suffix = numberOfDays == 1 ? "day" : "days"
return numberOfDays == 0 ?
NSLocalizedString("Daylights Saving transition will occur in < 24 hours",
comment: "Daylights Saving transition will occur in < 24 hours") :
"Daylight Savings transition will occur in \(numberOfDays) \(suffix)!"
}
private func checkForUpcomingEvents() -> (String, String)? {

Loading…
Cancel
Save