I'm the author of the Perl DateTime library. It works correctly as _documented_. Here's the first two paragraphs of the docs: > DateTime is a class for the representation of date/time combinations, and is part of the Perl DateTime project. > It represents the Gregorian calendar, extended backwards in time before its creation (in 1582). This is sometimes known as the "proleptic Gregorian calendar". In this calendar, t…
Who else uses the proleptic Gregorian calendar other than programmers of datetime libraries?
In science-related code, I can image a case for calculating things like seconds elapsed across a very long time period. But in that case you're not really dealing with dates. Instead, you want something like the Unix epoch, but probably with an earlier epoch start.
There may be some very niche cases for pre-1582 dates in code that I'm not thinking of. But I'd expect that in this case you're going to put a lot of effort into finding the right libraries, or you might just write your own code.
Regardless, the linked blog post says of DateTime: "Unfortunately, like Python, a proper error message for impossible Gregorian dates is notably absent."
But this is just wrong. There's no "proper error message" to emit. The code works as documented.