From 88111c28ae485ac69263dfdfbf2845167ecc9069 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Fri, 17 May 2024 19:36:30 +0530 Subject: [PATCH 1/3] DOC: add SA01 ES01 for pandas.Timestamp.dst --- pandas/_libs/tslibs/timestamps.pyx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index fb22563d34e11..a1696c14eaaef 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -1658,6 +1658,14 @@ class Timestamp(_Timestamp): """ Return the daylight saving time (DST) adjustment. + This method returns the DST adjustment as a `datetime.timedelta` object + if the Timestamp is timezone-aware and DST is applicable. + + See Also + -------- + Timestamp.tz_localize : Localize the Timestamp to a timezone. + Timestamp.tz_convert : Convert timezone-aware Timestamp to another time zone. + Examples -------- >>> ts = pd.Timestamp('2000-06-01 00:00:00', tz='Europe/Brussels') From 85401827bef24a72ed926eb7a972fa836486a947 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Fri, 17 May 2024 19:36:49 +0530 Subject: [PATCH 2/3] DOC: remove SA01 ES01 for pandas.Timestamp.dst --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 4bea3a462db07..3141f1ef00461 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -254,7 +254,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Timestamp.ctime SA01" \ -i "pandas.Timestamp.date SA01" \ -i "pandas.Timestamp.day GL08" \ - -i "pandas.Timestamp.dst SA01" \ -i "pandas.Timestamp.floor SA01" \ -i "pandas.Timestamp.fold GL08" \ -i "pandas.Timestamp.fromordinal SA01" \ From a9ac685f23a75b3213771e8f8c4925e5058e78ab Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Fri, 17 May 2024 20:48:21 +0530 Subject: [PATCH 3/3] DOC: add SA01 ES01 for pandas.Timestamp.dst --- pandas/_libs/tslibs/nattype.pyx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandas/_libs/tslibs/nattype.pyx b/pandas/_libs/tslibs/nattype.pyx index dbe9f72af9750..9a7f233ea8259 100644 --- a/pandas/_libs/tslibs/nattype.pyx +++ b/pandas/_libs/tslibs/nattype.pyx @@ -542,6 +542,14 @@ class NaTType(_NaT): """ Return the daylight saving time (DST) adjustment. + This method returns the DST adjustment as a `datetime.timedelta` object + if the Timestamp is timezone-aware and DST is applicable. + + See Also + -------- + Timestamp.tz_localize : Localize the Timestamp to a timezone. + Timestamp.tz_convert : Convert timezone-aware Timestamp to another time zone. + Examples -------- >>> ts = pd.Timestamp('2000-06-01 00:00:00', tz='Europe/Brussels')