|
10 | 10 |
|
11 | 11 | .. note::
|
12 | 12 |
|
13 |
| - Like Python's datetime, mpl uses the Gregorian calendar for all conversions |
14 |
| - between dates and floating point numbers. This practice is not universal, |
15 |
| - and calendar differences can cause confusing differences between what |
16 |
| - Python and mpl give as the number of days since 0001-01-01 and what other |
17 |
| - software and databases yield. For example, the `US Naval Observatory |
18 |
| - <http://www.usno.navy.mil/USNO/astronomical-applications/data-services/jul-date>`_ |
19 |
| - uses a calendar that switches from Julian to Gregorian in October, 1582. |
20 |
| - Hence, using their calculator, the number of days between 0001-01-01 and |
21 |
| - 2006-04-01 is 732403, whereas using the Gregorian calendar via the datetime |
| 13 | + Like Python's datetime, mpl uses the Gregorian calendar for all |
| 14 | + convrsions between dates and floating point numbers. This practice |
| 15 | + is not universal, and calendar differences can cause confusing |
| 16 | + differences between what Python and mpl give as the number of days |
| 17 | + since 0001-01-01 and what other software and databases yield. For |
| 18 | + example, the US Naval Observatory uses a calendar that switches |
| 19 | + from Julian to Gregorian in October, 1582. Hence, using their |
| 20 | + calculator, the number of days between 0001-01-01 and 2006-04-01 is |
| 21 | + 732403, whereas using the Gregorian calendar via the datetime |
22 | 22 | module we find::
|
23 | 23 |
|
24 | 24 | In [31]:date(2006,4,1).toordinal() - date(1,1,1).toordinal()
|
|
0 commit comments