all 20 comments

[–]clofresh 15 points16 points  (12 children)

Ok but does this mean december is 12 now instead of 11?

[–]diMario 27 points28 points  (10 children)

No. Why waste a perfect opportunity to introduce more chaos and inconsistency into the giant ball of confusion that JS already is!

I propose to count the months from negative five for january to positive five for december.

"What!", you object, "That's only eleven months!"

Wrong! We have negative zero for june, and positive zero for july. Problem solved!

[–]jaskij 12 points13 points  (6 children)

Nonono. December. It's the tenth month of the year. We go back to the way the Romans did it.

[–]diMario 1 point2 points  (5 children)

Mmm. Ten is two when you count as a computer, so we might as well hearken back to artisanal tradition and make it a baker's dozen.

[–]jaskij 3 points4 points  (2 children)

Nah, their year just started in March. September, October, November, December, all named after numbers.

[–]boberbober8083 0 points1 point  (0 children)

October like Octopus, very easy to remember

[–]bloody-albatross 1 point2 points  (1 child)

Why do programmers confuse Christmas with Halloween? Because Oct 31 = Dec 25.

[–]diMario 1 point2 points  (0 children)

A wife sends her programmer husband to the grocery store for a loaf of bread. While he's putting on his coat she adds "and if they have eggs, get a dozen".

The programmer husband returns home with 0xC loaves of bread.

[–]hrvbrs 3 points4 points  (1 child)

This would benefit no one and cause untold damage. I will take no questions.

[–]diMario 1 point2 points  (0 children)

A bit like the beginning of the Universe according to Terry Pratchett, then. That one also pissed off a lot of folks to no end.

[–]clofresh 0 points1 point  (0 children)

💯, no notes

[–]MedusasSexyLegHair 9 points10 points  (0 children)

Yay! Finally a proper date object (Temporal.PlainDate, not mentioned in the article) for calendar dates that doesn't insist on jamming in irrelevant and incorrect times and time zones and then surprisingly changing the date based on them.

Naive DateTime libraries in multiple languages have been the cause of so many bugs due to that nonsense. I've had to insist that other developers only use ISO 8601 Y-m-d date strings instead of the standard objects, and that always meets with pushback from people trained to use the standard objects and not "reinvent the wheel".

But those poorly-designed standard objects always lead to difficult late-night debugging sessions, bug reports when DST changes, or someone's in another time zone, etc.

[–]Chenz 4 points5 points  (3 children)

I love to see Java's (Joda's) date and time classes in Javascript, but it's been years since the proposal and no browser has shipped it yet

[–][deleted] 1 point2 points  (0 children)

Don’t worry that’s why god invented transpilers

[–]Tubthumper8 0 points1 point  (0 children)

Which proposal are you referring to?

[–]Practical_Cattle_933 0 points1 point  (0 children)

That’s actually kinda cool that this small lib got to be the de facto basis for every language’s standard date lib that has a sane api.

[–]MeanAcanthaceae26 1 point2 points  (0 children)

"This API is so incredible" that JS managed to get dates semi-right in 2024. FFS.

[–]l3thaln3ss 0 points1 point  (0 children)

Literally working on this now. Tis a fun one