Why is this code not working? Medic Question Doubt

Question:

My code:(In Python 3.6)

t=int(input())
l1=[]
for i in range(0,t):
l1.append(list(map(int,input().split(‘:’))))

for i in range(0,t):

date = l1[i][2]
year = l1[i][0]
month = l1[i][1]

count=0
while(True):
    if month == 1 or month ==3 or month ==5 or month ==7 or month ==8 or month==10 or month==12:
        date += 2
        count += 1
        if date == 30 or date==31:
            print(count)
            break
    elif month == 4 or month==6 or month==9 or month==11:
        date += 2
        count +=  1
        if date == 30 or date==29:
            month+=1
    elif month == 2:
        if year % 4 == 0 and year % 100 != 0 or year % 400 ==0:
            date += 2
            count+=1
            if date == 28 or date==29:
                print(count)
                break
        else:
            date  +=2
            count+=1
            if date ==27 or date==28:
                month+=1