From 0b93dbd83b1d0cce401bf2bd61bd34c6b1103a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20M=C3=BChlbauer?= Date: Thu, 9 Jan 2025 15:23:05 +0100 Subject: [PATCH] fix time-coding.rst, add reference to time-series.rst. --- doc/internals/time-coding.rst | 2 +- doc/user-guide/time-series.rst | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/internals/time-coding.rst b/doc/internals/time-coding.rst index f3cfe824200..da025dea1e2 100644 --- a/doc/internals/time-coding.rst +++ b/doc/internals/time-coding.rst @@ -326,7 +326,7 @@ CF time decoding Decoding of ``values`` with a time unit specification like ``"seconds since 1992-10-8 15:15:42.5 -6:00"`` into datetimes using the CF conventions is a multistage process. -1. If we have a non-standard calendar (e.g. ``"noleap"``) decoding is done with the ``cftime`` package, which is not covered in this section. For the``"standard"``/``"gregorian"`` calendar as well as the ``"proleptic_gregorian"`` calendar the above outlined pandas functionality is used. +1. If we have a non-standard calendar (e.g. ``"noleap"``) decoding is done with the ``cftime`` package, which is not covered in this section. For the ``"standard"``/``"gregorian"`` calendar as well as the ``"proleptic_gregorian"`` calendar the above outlined pandas functionality is used. 2. The ``"standard"``/``"gregorian"`` calendar and the ``"proleptic_gregorian"`` are equivalent for any dates and reference times >= ``"1582-10-15"``. First the reference time is checked and any timezone information stripped off. In a second step, the minimum and maximum ``values`` are checked if they can be represented in the current reference time resolution. At the same time integer overflow would be caught. For the ``"standard"``/``"gregorian"`` calendar the dates are checked to be >= ``"1582-10-15"``. If anything fails, the decoding is attempted with ``cftime``. diff --git a/doc/user-guide/time-series.rst b/doc/user-guide/time-series.rst index 8c4d9aa5de7..8205f19bc93 100644 --- a/doc/user-guide/time-series.rst +++ b/doc/user-guide/time-series.rst @@ -42,7 +42,8 @@ using :py:func:`pandas.to_datetime` and :py:func:`pandas.date_range`: For :py:func:`pandas.date_range` the ``unit``-kwarg has to be specified and for :py:func:`pandas.to_datetime` the selection of the resolution isn't possible at all. For that :py:class:`pd.DatetimeIndex` can be used - directly. + directly. There is more in-depth information in section + :ref:``. Alternatively, you can supply arrays of Python ``datetime`` objects. These get converted automatically when used as arguments in xarray objects (with us-resolution):