Skip to content

DOC: improve removal for julian dates [ci doc] #26887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/api/next_api_changes/removals/26852-OG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
``EPOCH='-4713-11-24T12:00'`` so that 2000-01-01 at 12:00 is 2_451_545.0 (see
``EPOCH='-4713-11-24T12:00'`` so that 2000-01-01 at 12:00 is ``2_451_545.0`` (see

possibly to clarify that it is a "Python float".

But clearly an improvement to me.

<https://en.wikipedia.org/wiki/Julian_day>`).