import re


def parse_time_window(window):
    """ Parse the specified time window and return as (float) minutes, or None if invalid """
    regexps = {
        '^(\d+):?$': lambda match: float(match.group(1)) * 60,
        '^(\d+):(\d+)$': lambda match: float(match.group(1)) * 60 + float(match.group(2)),
        '^:(\d+)$': lambda match: float(match.group(1))
    }
    for r in regexps:
        m = re.match(r, window)
        if m:
            return regexps[r](m)
    return None