calculate days of a month I would like to see the shortest expression to calculate the days (or the last day)  of a month in any language.

Considering y as the number of year and m as month.

Basic rules


without date / time functions.
considering leap years.
there is not other rule.
C, 47 45 characters
30+(m&gt;7^m&amp;1)-(m^2?0:2-!(y%100||(y/=100),y%4))

Taken from an answer to an earlier question where I borrowed a couple of tricks from another user. Returns the length of month m in year y for the Gregorian calendar. ugoren's answer to the same question is shorter and may give a shorter answer to this question.
With thanks to mob for his leap year calculation.