[Python] straightforward, parse string
\nclass Solution:\n    def numberOfRounds(self, loginTime: str, logoutTime: str) -> int:\n        login = self.to_min(loginTime)\n        logout = self.to_min(l
```\nclass Solution:\n    def numberOfRounds(self, loginTime: str, logoutTime: str) -> int:\n        login = self.to_min(loginTime)\n        logout = self.to_min(logoutTime)\n        \n        if logout < login:  # new day after midnight\n            logout = logout + 24 * 60\n            \n        if logout - login < 15:\n            return 0\n        \n        login = self.round_login(login)\n        logout = self.round_logout(logout)\n        \n        return (logout - login) // 15\n    \n    \n    def to_min(self, current_time: str) -> int:\n        h, m = map(int, current_time.split(":"))\n        return h * 60 + m\n    \n    def round_login(self, m: int):\n        return m if m % 15 == 0 else m + (15 - m % 15)\n    \n    def round_logout(self, m: int):\n        return m if m % 15 == 0 else m - (m % 15)\n```
['Python', 'Python3']