Why does Quarto consider ISO 8601 timestamps with positive AYN identifiers to be "invalid"? #15406
DescriptionWhen I enter: ---
date: 2026-11-20T14:40:49Z…it is considered to be valid, whereas |
Replies: 1 comment 7 replies
|
Thanks for the report. Rejecting a four-digit
For
The six-digit form works: Do you need the |
I had a closer look, and there is actually nothing to report upstream.
day.js, Luxon, Moment, date-fns, Temporal and JavaScript's own
Dateall accept a signed year only with exactly six digits, so+2026and-2026are rejected everywhere.Quarto reads
datewith three libraries in turn (@std/datetime,moment-guessand day.js), then falls back to JavaScript'sDate.Some of what you saw comes from them: the six-digit rule, and the JavaScript engine dropping the sign of a date without a time.
The rest is on the Quarto side.
Quarto doesn't check the result or warn, so
Invalid Dateends up in the page, in listings and in feeds, and-2026-11-20or-0001-01-01quietly shows as the wrong year.I op…