To find the number of days in a month, one can use the formula

=DAY(DATE(1,A1+1,0)) where A1 is the number of the month, for example January = 1, February = 2