News for hackers. Stuff that matters.
Re:Why are 2025/05/28 and 2025-05-28 different days in JavaS... by fnord123 on Wednesday May 28, 2025 @04:03AM (#44113724)
RFC3339.

ISO 8601 allows for 2 or 6 digit years. Truncating to 2 is just incorrect, and 6 digits is absurd. And you can read the RFC without paying ISO - and you can discuss the RFC with people who have also read it instead of relying on people using the Wikipedia page to interpret and explain ISO 8601.

I have a scheduling service at work and I keep getting requests for implementing ISO 8601 timestamps but I ignore them. RFC3339 is the way forward.

Re:Why are 2025/05/28 and 2025-05-28 different days in JavaS... by jcul on Wednesday May 28, 2025 @04:15AM (#44113774)
There's this handy venn diagram that I've seen floating around for a long time.

Just found a random link to it with an image search:

https://gyazo.com/d8517f72e24c38f055e17182842b991c/max_size/...

ISO 8601 does have some strange formats...

Re:Why are 2025/05/28 and 2025-05-28 different days in JavaS... by badmintonbaseba on Wednesday May 28, 2025 @04:20AM (#44113810)
That's a screenshot of this website:

https://ijmacd.github.io/rfc3339-iso8601/

Re:Why are 2025/05/28 and 2025-05-28 different days in JavaS... by jcul on Wednesday June 04, 2025 @06:45PM (#44186356)
Thanks! That's where I remember it from.
Re:Why are 2025/05/28 and 2025-05-28 different days in JavaS... by skissane on Wednesday May 28, 2025 @05:00AM (#44114052)
> ISO 8601 does have some strange formats...

Not that I’ve ever really had cause to use it in anger, but I like the idea of ISO week dates.

Effectively, the ISO weak year (often differs from the calendar year in the last week of December / first week of January), ISO week number and day of week form a leap week calendar - instead of having 365 days in a common year and 366 in a leap year, it has 364 days in a common year and 371 in a leap week year, with leap weeks (obviously) being less frequent than leap days.

The Sym454 calendar [0] takes this idea further to create a perpetual calendar, with 12 months of 4 or 5 weeks; in leap years the 12th month is 5 weeks instead of 4 weeks long. However, the leap week rule proposed by Sym454 is different from that proposed by ISO 8601; the author of Sym454 argues his proposed rule has theoretical advantages (simple calculation and more uniform distribution of leap weeks). That said, there is a variant of Sym454 which uses the ISO 8601 leap week rule.

[0] https://kalendis.free.nf/symmetry.htm?i=1

Re:Why are 2025/05/28 and 2025-05-28 different days in JavaS... by Y_Y on Wednesday May 28, 2025 @04:21AM (#44113814)
I believe two-digit years haven't been allowed for a while:

> ISO 8601:2000 allowed truncation (by agreement), where leading components of a date or time are omitted. Notably, this allowed two-digit years to be used as well as the ambiguous formats YY-MM-DD and YYMMDD. This provision was removed in ISO 8601:2004.

(That's from https://en.wikipedia.org/wiki/ISO_8601 - I don't have the standards handy, ironically.)

Honestly I'm happy with either the RFC or ISO, but it seems like most normies haven't heard of RFCs so ISO is my default.

Re:Why are 2025/05/28 and 2025-05-28 different days in JavaS... by fnord123 on Wednesday May 28, 2025 @10:48AM (#44116597)
I believe you. But I haven't paid ISO for the pleasure of reading the actual spec so that passed me by.
Re:Why are 2025/05/28 and 2025-05-28 different days in JavaS... by account42 on Wednesday May 28, 2025 @06:45AM (#44114609)
Plus RFC3339 allows you to use a space instead of the ugly T delimiter between the date and time.
Re:Why are 2025/05/28 and 2025-05-28 different days in JavaS... by realaleris149 on Wednesday May 28, 2025 @03:37PM (#44119891)
> 6 digit years

Totally insufficient for capturing important future events like the dead of the sun.