Swift solution
Swift solution\n\nclass Solution {\n    func time2Int(_ time: String) -> Int {\n        let split = time.split(separator: ":")\n        return (Int(split[0]) ??
Swift solution\n```\nclass Solution {\n    func time2Int(_ time: String) -> Int {\n        let split = time.split(separator: ":")\n        return (Int(split[0]) ?? 0) * 60 + (Int(split[1]) ?? 0)\n    }\n    func numberOfRounds(_ startTime: String, _ finishTime: String) -> Int {\n        let roundTime = 15, startTime = time2Int(startTime), tpmTime = time2Int(finishTime), finishTime = tpmTime > startTime ? tpmTime : (tpmTime + time2Int("24:00"))\n        var result = 0\n        for roundStartTime in stride(from: 0, to: 2 * 24 * 60, by: roundTime) where startTime <= roundStartTime && finishTime >= (roundStartTime + roundTime) {\n            result += 1\n        }\n        return result\n    }\n}\n```
['Swift']