Skip to content

Commit 11aa656

Browse files
authored
Merge pull request matplotlib#26887 from jklymak/doc-expand-julian
DOC: improve removal for julian dates [ci doc]
2 parents 8fc7da4 + d69ace9 commit 11aa656

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/api/next_api_changes/removals/26852-OG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@
33

44
... of the `.dates` module are removed without replacements. These were
55
undocumented and not exported.
6+
7+
Julian dates in Matplotlib were calculated from a Julian date epoch: ``jdate =
8+
(date - np.datetime64(EPOCH)) / np.timedelta64(1, 'D')``. Conversely, a Julian
9+
date was converted to datetime as ``date = np.timedelta64(int(jdate * 24 *
10+
3600), 's') + np.datetime64(EPOCH)``. Matplotlib was using
11+
``EPOCH='-4713-11-24T12:00'`` so that 2000-01-01 at 12:00 is 2_451_545.0 (see
12+
<https://en.wikipedia.org/wiki/Julian_day>`).

0 commit comments

Comments
 (0)