Ada package for dates prior to 1900?


How does one do calendar, date and time, calculations in Ada if the dates are prior to 1900? I’m sure that this is a real problem that has been encountered previously. I’ve never seen anything that does this. Do people just make a foreign call to Perl or UNIX cal program?

Ken Wolcott

The Matreshka League library looks like it has fairly comprehensive support for date/time operations using a base time in 1582 AD.

Generally speaking, if you’re regularly working with dates prior to January 1, 1970, you should consider parsing the “backzone” file from the tzdata distribution and doing the math yourself rather than relying on a library. There are a lot of cases that are open to interpretation depending on your project’s goals. The comments in backzone may be helpful context.

What operations do you need?


I’lol take a look at the Matreshka League library.

No need at all; just significant curiosity that such a thing didn’t (apparently) exist.


PragmARC.Date_Handler can do formatting, day-of-week, leap-year, and days-in-month for any year CE in Positive, if that’s of any interest.

1 Like