T004error

Invalid date, time or duration

A date, time, datetime or duration literal does not match its expected format.

Temporal literals are parsed when the template is built. A datetime must be RFC 3339 (YYYY-MM-DDTHH:mm:ssZ), dates and times have their own fixed formats, and durations use Go's duration syntax, such as 1h30m.

Rewrite the value in the format the message names.

$ piko explain T004

Build output ends each diagnostic with a link to this page, and editors using the Piko language server link the code under the squiggle. Look for CodeInvalidTemporalFormat in Piko's source to see where it is reported.