News for hackers. Stuff that matters.
Re:Few lesser known tricks, quirks and features of C by zalyalov on Sunday July 02, 2023 @03:43AM (#36559245)
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
Re:Few lesser known tricks, quirks and features of C by defrost on Sunday July 02, 2023 @04:22AM (#36559465)
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.