Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

!(x % y) is the same as (x % y == 0), which means the remainder is zero, so x is divisible by y.

So it returns 29 if divisible by 400, 28 if divisible by 100, etc.



Oops, you are absolutely correct!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: