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

You are viewing a single thread.
View all comments View context
21 points

On which planet? Monday is 1

permalink
report
parent
reply
11 points
*

Both Monday and Sunday are used as the first day of the week with quite some regularity. It’s a completely arbitrary standard no different to "the tenth month is the one called “October”. Or dividing a day into 24 segments which are each broken into 60 smaller segments of 60 even smaller segments. You can’t say either is “wrong” per se.

Personally, I was brought up learning Sunday is the first day of the week, but at some point decided that was bullshit partly because it’s the week end. But also just from a practical standpoint when looking at a calendar, it’s useful to have the weekend days grouped together.

permalink
report
parent
reply
3 points

Funny thing, september comes from the number 7, october from 8 and november and december from 9 and 10, as the year in ancient rome was starting around march. This problem is timeless.

permalink
report
parent
reply
2 points

Huh. I knew about the problem (that’s why I used October as my example, rather than, say, February), but I was mistaken as to the cause. The way I had always heard it told, September–December don’t match their current place in the year because of the addition of July and August. But I just looked it up and it seems you’re right. Those months are merely renamings of Quintilis and Sextilis, and the numbering issue comes from moving the start of the year from March to January.

permalink
report
parent
reply
2 points

Yeah, that’s why my calendar starts the week on Saturday

permalink
report
parent
reply
9 points

On planet America.

permalink
report
parent
reply
19 points

Ah the same place that uses feet and inches, and puts the month before the day, and cannot read a 24 hour clock?

permalink
report
parent
reply
4 points

I was off by one, but Sunday is 0 in javascript

permalink
report
parent
reply
13 points

JavaScript is wrong

permalink
report
parent
reply
3 points

That’s nice, you can run weekend = dayOfWeek > 5 and then explain to the boss why clients are getting work texts on a sunday

permalink
report
parent
reply
-1 points
*
Deleted by creator
permalink
report
parent
reply
6 points

Cron has clearly the superior numbering system, where sunday is both 0 and 7

permalink
report
parent
reply
1 point
*

Depending on how you’re counting your integers, Monday is 0, being the first day of the week.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 7.2K

    Monthly active users

  • 955

    Posts

  • 37K

    Comments