• Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      5
      ·
      9 days ago

      Do you think so? Surely, it’s able to handle dates before the year 999 correctly, so I’d also expect it to handle years beyond 10000. The \d{4} is just our bodged assumption, because well, I have actually never seen a log line with a year that wasn’t 4 digits…

      • itslilith@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        8
        ·
        9 days ago

        Kinda?

        Each date and time value has a fixed number of digits that must be padded with leading zeros.

        To represent years before 0000 or after 9999, the standard also permits the expansion of the year representation but only by prior agreement between the sender and the receiver.[21] An expanded year representation [±YYYYY] must have an agreed-upon number of extra year digits beyond the four-digit minimum, and it must be prefixed with a + or − sign[22] instead of the more common AD/BC (or CE/BCE) notation; by convention 1 BC is labelled +0000, 2 BC is labeled −0001, and so on.[23]

        • Ephera@lemmy.ml
          link
          fedilink
          English
          arrow-up
          5
          ·
          8 days ago

          Oh wow, I really expected the standard to just say that however many digits you need are fine, because you know, maths. But I guess, this simplifies handling all kinds of edge cases in the roughly 7975 years we’ve still got.