Hacker News new | ask | show | jobs
by divbzero 287 days ago
> The answer: Text.

That was my immediate thought too and led to me wondering: How do you represent BCE dates in ISO 8601?

Apparently ISO 8601 always supports YYYY from 0000 (1 BCE) to 9999 (9999 CE). ISO 8601 can also extend beyond those limits if agreed upon by sender and receiver: e.g. -0001 (2 BCE), -0002 (3 BCE), etc.

2 comments

Hopefully nobody uses this "standard" that bakes in an off-by-one error into the human readable form.

IMHO if code is doing extra parsing to handle -ve years, they should have enough logic to know to how to skip the zeroth year when converting to and from the human readable form.

Okay… someone please steelman this seemingly unhinged decision.

edit: Apparently that’s how they do dates in astronomy since it makes the math easier. Can’t even count on years being gregorian these days…