220
submitted 11 months ago* (last edited 11 months ago) by DroneRights@lemm.ee to c/programmer_humor@programming.dev

Yes, someone actually did this and I found it running on our server

you are viewing a single comment's thread
view the rest of the comments
[-] irdc@derp.foo 29 points 11 months ago* (last edited 11 months ago)
weekend = day_of_week in (“sat”, “sun”)

As a bonus this completely sidesteps the issue of what day is 0 or 1.

[-] baseless_discourse@mander.xyz 6 points 11 months ago

Until some idiot sends in "Sunday" as days of the week...

[-] activ8r@sh.itjust.works 5 points 11 months ago* (last edited 11 months ago)

/^(sun|sat)/i.test(day_of_week)

👍

[-] snowe@programming.dev 8 points 11 months ago

Ah yes the ole sunweday. My favorite day of the weekend.

load more comments (1 replies)
load more comments (1 replies)
load more comments (2 replies)
this post was submitted on 16 Nov 2023
220 points (95.8% liked)

Programmer Humor

19315 readers
40 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 1 year ago
MODERATORS