Open DenisExcoffier opened 6 years ago
Hello and thanks for the report.
As documented, dateutils' dates start at 1601 because the day before the first of January of 1601 was provably a Sunday, assuming the Gregorian reformation in 1582. This is already in stark contrast to what unix cal produces because they assume the adoption in 1752.
As for the maximum, while not documented, it is at the moment in the area you were looking at, year 4092 or so.
I see no benefit in supporting dates before the current minimum or after the current maximum. If done correctly this adds a lot of complexity to the code. If done incorrectly you have a tool that is of no use to people actually working with dates in those ranges.
May I ask for the motivation of this bug report?
Hello,
dateadd 1600-12-31 0 produces: dadd: Error: cannot parse duration string `1600-12-31' (1600-12-31 was expected)
another example:
dateround 4094-01-01 Jun Sun produces: 0000-00-00 (4094-06-06 was expected)
Please make dateutils work smoothly for 0001 to 9999 at minimum.