this post was submitted on 10 Oct 2025
612 points (99.2% liked)

Programmer Humor

27977 readers
1054 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] ByteJunk@lemmy.world 47 points 2 months ago (12 children)

Really curious in what scenarios people would be writing enums with months and weekdays.

Because short of developing yet another library to handle date and time, everything else is likely a disaster waiting to happen...

[โ€“] Lightfire228@pawb.social 7 points 2 months ago

I did it once to pull out data from a spreadsheet into a database. Specifically, I needed "${DataType}${Month}" for each month for 3 different datatypes

Iirc, i used an sql pivot (or unpivot) in that query too

Usually, it's situations like this where you're parsing data from strings, and you need some glue code to interface between the input data, and the date library you're using to actually resolve the datetime

load more comments (11 replies)