Post #2552744
2026-05-12 03:28 UTC
PlainDateTime.from docs
> As an input, you may optionally include the offset and time zone identifier, in the same format as ZonedDateTime, but they will be ignored. Note that the offset must not be Z. Other annotations in the [key=value] format are also ignored, and they must not have the critical flag.
Why.... why do you accept some offsets but not all of them. Why do you do this to me
Replies (1)
-
@raphael@mastodon.sdf.org 2026-05-12 03:46
https://github.com/tc39/proposal-temporal/issues/1751 I am so angry at this. The working group correctly identified that if your input string to PlainDateTime has Z then it’s a UTC timestamp and probably a bug in hiding (so it blows up). But it didn’t acknowledge that _any_ offset, not just UTC, is the same problem! So it should blow up for any offset, not just UTC! Type theory mindedness would have saved us from this colossal mistake