Search code examples
datetimedatetime-managementscientific-computing

If I wanted to work using dates and time going millions of years into the past/future how would I do it?


If I wanted to work using dates and time going millions of years into the past/future how would I do it in C/C++/C#?

For example say I was working on an algorithm to see if a comet was going to hit the earth? Are there commercial or open source libraries that do this?

Most DateTime values only work for a few years. Unixes will run out in only 2038!.

Tony


Solution

  • Astronomers use their own calendar, different from the civil, Gregorian calendar.

    Astronomical Julian Dates are what they use.

    Look at http://en.wikipedia.org/wiki/Julian_day

    Here's a typical package: Solar Clock.