Great it's working for you!
and, actually, the function in my first post would have done the trick according to me...
but it's however you want to implement it of course
* On function 'IsLeapYear'
* Parameter 'year' (Number)
-> Functions: Set return value (year%4) = 0 ? (year%100) = 0 ? (year%400) = 0 ? 1 : 0 : 1 : 0