Good day. Are there libraries for working with big dates and times? Gregorian calendar. That is, before 0000 - and more than 10,000 years.

Tried boost :: date_time there restriction 1400-10000. I also wrote a wrapper over C time.h, but there is a reference point of 1900.

[+] - necessarily [!] - preferably [-] - not necessarily

  1. [+] Precise with leap years.
  2. [+] Standard operations (creation from a certain format, addition, subtraction, addition of intervals)
  3. [!] Support for BC and BC
  4. [!] Support the centuries.
  5. [+] Support hours, minutes, seconds.
  6. [!] Ability to set the interval manually.
  7. [-] The choice of accuracy manually (the ability to set 128 bit numbers for seconds for example).
  8. [-] Performance is not important.
  • Interest Ask. Are commercial libraries considered? - gecube
  • @manking, if this is interesting for you ( especially 128-bit arithmetic ), then why not write it yourself? - Here is a new section opened - "research . " In principle, you can get an interesting job. - avp
  • They write that QDateTime able to:> The range of valid dates is from January 2nd, 4713 BCE, to some time in the year 11 million CE. The Julian Day returned by QDate::toJulianDay() Julian Day QDate::toJulianDay() is a number in the contiguous range from 1 to overflow, even across QDateTime's "date holes". For example, Hebrew, Islamic or Chinese. - Costantino Rupert
  • one
    There is, however, a suspicion that correct work with dates prior to the Gregorian calendar is a difficult task. - Costantino Rupert
  • 3
    I have only one explanation - a man made a time machine and he needs to add software. - KoVadim

1 answer 1

as suggested in the comment , the QDateTime class supports an interval of +/- 292 million years (relative to the beginning of an era).