Assuming each cell always steps by 1 day:

=MATCH(9.99E+307,B1:B31)-ROW(B1)+1