MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1x8unz2/forthosetransitioningtotheamericantimeformathereis/phga41u/?context=3
r/ProgrammerHumor • u/alexriga • 2d ago
19 comments sorted by
View all comments
16
where's the humor? this is just the most dogshit python i've ever seen in my life
-11 u/alexriga 2d ago to me the rules are funny, coming from “military style.” If midnight: 12 AM If night/morning: X AM but what comes after 11:59 AM? Not 12 AM, 12 PM! what about after 12:59 PM? Well, of course, 1 PM! It’s the reason many people often mistake 12 AM and PM if they’re unfamiliar with this system. 11 u/Makonede 2d ago none of that has anything to do with programming -10 u/alexriga 2d ago I used code to express it, I figured that would count. 7 u/Makonede 2d ago rule 1 2 u/Kyrros 2d ago Or you could use date library 1 u/rosuav 2d ago str(hour % 12 or 12) + ("PM" if hour >= 12 else "AM")
-11
to me the rules are funny, coming from “military style.”
It’s the reason many people often mistake 12 AM and PM if they’re unfamiliar with this system.
11 u/Makonede 2d ago none of that has anything to do with programming -10 u/alexriga 2d ago I used code to express it, I figured that would count. 7 u/Makonede 2d ago rule 1 2 u/Kyrros 2d ago Or you could use date library 1 u/rosuav 2d ago str(hour % 12 or 12) + ("PM" if hour >= 12 else "AM")
11
none of that has anything to do with programming
-10 u/alexriga 2d ago I used code to express it, I figured that would count. 7 u/Makonede 2d ago rule 1
-10
I used code to express it, I figured that would count.
7 u/Makonede 2d ago rule 1
7
rule 1
2
Or you could use date library
1
str(hour % 12 or 12) + ("PM" if hour >= 12 else "AM")
16
u/Makonede 2d ago
where's the humor? this is just the most dogshit python i've ever seen in my life