this post was submitted on 09 Dec 2023
323 points (90.5% liked)
Mildly Interesting
16947 readers
366 users here now
This is for strictly mildly interesting material. If it's too interesting, it doesn't belong. If it's not interesting, it doesn't belong.
This is obviously an objective criteria, so the mods are always right. Or maybe mildly right? Ahh.. what do we know?
Just post some stuff and don't spam.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Remember, kids, not to ever compute dates yourselves. Use a library for that.
I've made that mistake a couple times, sending bills to people for things like April 31st. Have since swapped to letting python make calendars for me.
https://youtu.be/-5wpm-gesOY?t=8m36s
Memories of the old shitty codebase I inherited that had a bunch of if/else statements to add a day every four years. Which, of course, isn't even correct.
To be fair, by the time that code will fail, it won’t run anymore for a host of other reasons.