Skip to content
Discussion options

You must be logged in to vote

This is indeed intentional. Jiff follows the Temporal ISO 8601 grammar, which requires that datetimes prior to 1 BCE are represented with a leading - and 6 digits for the year.

Negative timestamps are somewhat odd and a bit of a grey area in ISO 8601 proper. According to ISO 8601, -0280-01-01T00:00:00Z is not inherently invalid, but requires "mutual agreement" among the parties to agree upon it, including a specification on the number of digits to allow for the year.

Note though that Jiff's strptime support is a bit more flexible. For example, this works:

use jiff::{civil::DateTime, tz::TimeZone};

fn main() -> anyhow::Result<()> {
    let s = "-0280-01-01T00:00:00Z";
    let dt = DateTime::

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Yomguithereal
Comment options

Answer selected by Yomguithereal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants