goal: Int) -> Bool { let now = Date(), formatter = IDateFormatter() formatter.locale = Locale(identifier: ”ja_JP”) formatter.dateFormat = ”HH” let nowTime = formatter.string(from: now) for i in start…goal { let time = NSString(format: ”%02d”, i)) as String if nowTime == time { return true } } } }