in reply to simple stupid time question

Given $mo and $yr set properly and not the way struct tm gives them (Jan is 1 not 0 and 2000 is 2000 not 100):

(0,31,29-!(!($yr%4)&&$yr%100||not$yr%400),((31,30)x2,31)x2)[$mo]

Just a lark! (not intended for production code)

        - tye (but my friends call me "Tye")