Hacker News new | ask | show | jobs
by zalyalov 1083 days ago
That... that way to handle leap years can't possibly be right, can it? It doesn't account that you don't need to add the leap day of the current year if the day is before Feb 29
1 comments

Err, my bad, I left out the prequel (still a one liner)

y -= m < 3; dow = as above, etc;

I was focused on an 'obscure' yet fundemental part of the C language pointer | array equivalence.

Addendum: https://c-faq.com/misc/zeller.html