From d69ace945fd80ae8356227b055a4b94142f32f62 Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Fri, 22 Sep 2023 18:12:51 -0700 Subject: [PATCH] DOC: improve removal for julian dates [ci doc] --- doc/api/next_api_changes/removals/26852-OG.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/api/next_api_changes/removals/26852-OG.rst b/doc/api/next_api_changes/removals/26852-OG.rst index dc7d595f575f..08ad0105b70a 100644 --- a/doc/api/next_api_changes/removals/26852-OG.rst +++ b/doc/api/next_api_changes/removals/26852-OG.rst @@ -3,3 +3,10 @@ ... of the `.dates` module are removed without replacements. These were undocumented and not exported. + +Julian dates in Matplotlib were calculated from a Julian date epoch: ``jdate = +(date - np.datetime64(EPOCH)) / np.timedelta64(1, 'D')``. Conversely, a Julian +date was converted to datetime as ``date = np.timedelta64(int(jdate * 24 * +3600), 's') + np.datetime64(EPOCH)``. Matplotlib was using +``EPOCH='-4713-11-24T12:00'`` so that 2000-01-01 at 12:00 is 2_451_545.0 (see +`).