def get_all_shifts(calendar):
    """
    Return a sorted set containing all the shifts which may occur in a single day.
    """
    shift_names = set()
    for k, d in enumerate(calendar.keys()):
         for k, t in enumerate(calendar.get(d).keys()):
             shift_names.add(t)
    return sorted(shift_names)