You have two simple solutions:
5546>>m&1|30^(m==2)*2+(m==2&&y%4==0)))
or
(62648012>>m*2&3)+28+(m==2&&y%4==0)))
where m is the day of the month and y is the year.
this solution is similar to the below array, but the array of bits is masked in magic numbers.
olivecoder
source share