Python
Code
# Code
```python3 []
class Solution:
    def numberOfRounds(self, loginTime: str, logoutTime: str) -> int:
        starts = [0, 15, 30, 45]
        
        first_round_start = self.get_first_round_start(loginTime, starts)
        last_round_stop = self.get_last_round_stop(logoutTime, starts, (loginTime > logoutTime))

        return len(
            range(
                self.get_time_in_minutes(first_round_start)
                , self.get_time_in_minutes(last_round_stop)
                , 15
            )
        )

    
    def get_first_round_start(self, loginTime, starts):
        hr, minute = loginTime.split(":")
        next_round_start = 0

        if minute != "00":
            for start in starts:
                if start >= int(minute):  # Round up if falls between rounds
                    next_round_start = start
                    break

            if next_round_start == 0:  # I need to move on to next hour
                hr = (int(hr) + 1)
        
        return ":".join([f"{int(x):02}" for x in [hr, next_round_start]])
    
    def get_last_round_stop(self, logoutTime, starts, flag):
        hr, minute = logoutTime.split(":")
        last_round_stop = 0

        if minute != "00":
            for start in starts:
                if start + 15 > int(minute):
                    last_round_stop = start
                    break
        
        if flag:
            hr = str(24 + int(hr))

        return ":".join([f"{int(x):02}" for x in [hr, last_round_stop]])

    def get_time_in_minutes(self, time):
        hr, minutes = time.split(":")
        return (int(hr) * 60) + int(minutes)



        



```
['Python3']