Implementation using `:calendar` module is simple; only subracting 365 days to convert between Rata Die and the `gregorian_days` format that `:calendar` uses is necessary.    However, `:calendar` will not work with dates before the 'year 0' so I am now in dubio what I should do. See discussion below.