diff --git a/CHANGELOG.md b/CHANGELOG.md index 14d3cebc..f25d6bc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## unreleased +- Year `0000` may be disallowed in Date-Times and Dates. - Clarify Unicode and UTF-8 references. - Relax comment parsing; most control characters are again permitted. - Allow newline after key/values in inline tables. diff --git a/toml.md b/toml.md index 8862f0ea..09638bb4 100644 --- a/toml.md +++ b/toml.md @@ -569,14 +569,22 @@ time with a space character (as permitted by RFC 3339 section 5.6). odt4 = 1979-05-27 07:32:00Z ``` -One exception to RFC 3339 is permitted: seconds may be omitted, in which case -`:00` will be assumed. The offset immediately follows the minutes. +Contrary to RFC 3339, seconds may be omitted, in which case `:00` will be assumed. The +offset immediately follows the minutes. ```toml odt5 = 1979-05-27 07:32Z odt6 = 1979-05-27 07:32-07:00 ``` +Date-times in the year `0000` may throw errors for technical reasons. Although some +platforms may recognize year-zero date-times, for the sake of interoperability, avoid +using year-zero date-times in TOML documents. + +```toml +odt_year1 = 0001-01-01 00:00:00Z # NOTE: Earliest date-time guaranteed to be valid. +``` + Millisecond precision is required. Further precision of fractional seconds is implementation-specific. If the value contains greater precision than the implementation can support, the additional precision must be truncated, not @@ -601,6 +609,9 @@ Seconds may be omitted, in which case `:00` will be assumed. ldt3 = 1979-05-27T07:32 ``` +Date-times in the year `0000` may throw errors for technical reasons. Avoid them in TOML +documents. + Millisecond precision is required. Further precision of fractional seconds is implementation-specific. If the value contains greater precision than the implementation can support, the additional precision must be truncated, not @@ -616,6 +627,9 @@ represent that entire day without any relation to an offset or timezone. ld1 = 1979-05-27 ``` +Dates in the year `0000` may throw errors for technical reasons. Avoid them in TOML +documents. + ## Local Time If you include only the time portion of an