Which is meant by +/-9.2e18 years in timespan?

I was able to convert the 9.2e18 AD to a date, but I am confused about the exact date. Which date is 9.2e18 AD and and 9.2e18 BC?

Time span (absolute) - [9.2e18 BC, 9.2e18 AD] i.e +/- 9.2e18 years

NumPy documentation, section Datetime Units under Datetimes and Timedeltas

Code Meaning Time span (relative) Time span (absolute)
Y year +/- 9.2e18 years [9.2e18 BC, 9.2e18 AD]
M month +/- 7.6e17 years [7.6e17 BC, 7.6e17 AD]
W week +/- 1.7e17 years [1.7e17 BC, 1.7e17 AD]
D day +/- 2.5e16 years [2.5e16 BC, 2.5e16 AD]
  1. I have converted the 9.2e18 (epoch - I believe it represented in epochs) to a date. It gave me very big date which I did not expect. Are my assumptions accurate?
  2. How many years was covered according to the date 1970-01-01 from 9.2e18 BC?
  3. What are some examples using this timespan to judge my assumptions to get the date of 9.2e18 BC and 9.2e18 AD with units by NumPy?

Topic time epochs numpy mathematics time-series

Category Data Science


From the documentation you referred: "The length of the span is the range of a 64-bit integer times the length of the date or unit."

64 bit integer has values from -2^63 to 2^63-1, which is the same as from -9.2e18 to 9.2e18. So, the time span column shows you which dates would you cover if use only the corresponding units. Note, i.e. that time span for years 12 times bigger then time span for months and 52 times bigger then timespan for weeks.

So, the date 9.2e18BC is literally 9.2 quintillions years before christ

UPD with clarification to comment

First of all, there are two different concepts - the date (like 10th august of 2021) and time duration (like two years). The later is referred as time delta in python. And you can't add/subtract years in numpy from date because different years have different amount of time -- like 365 or 366 days. However you can subtract basically any amount of days like that:

start_date = np.datetime64('0000-01-01')
days_to_substract = np.timedelta64(100, 'D')
print(start_date - days_to_substract) # initial date minus 100 days
>>> -001-09-23

Note, that you can in fact manipulate with dates in vanilla python with datetime, but as mentioned in the other answer, the dates can not be less then 01-01-0001 for basic python without numpy


1 (Y)ear = 3.154e+16 nanoseconds.

In scientific notation, "E" refers to a power of 10. | So (9.2E+18) is written as "9.2 × 10^18" in scientific notation. The decimal value of (9.2E+18) would equal 9200000000000000000.

In reference to (Y)ears, what does the value (9.2E+18) mean?

  • 9.2 x 10^18 Milliseconds = 291,536,394 Years.
  • 9.2 x 10^18 Nanoseconds = 291.53639 Years.

The DateTime value type represents dates and times with values ranging from 00:00:00 (midnight), January 1, 0001 Anno Domini (Common Era) through 11:59:59 P.M., December 31, 9999 A.D. (C.E.) in the Gregorian calendar.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.