diff --git a/ci/code_checks.sh b/ci/code_checks.sh index e9f4ee1f391a2..0c239d49afd6e 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -179,7 +179,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.TimedeltaIndex.nanoseconds SA01" \ -i "pandas.TimedeltaIndex.seconds SA01" \ -i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \ - -i "pandas.Timestamp.day GL08" \ -i "pandas.Timestamp.fold GL08" \ -i "pandas.Timestamp.hour GL08" \ -i "pandas.Timestamp.max PR02" \ diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index 3268207b667f2..a9463ce8ad044 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -961,6 +961,29 @@ cdef class _Timestamp(ABCTimestamp): """ return ((self.month - 1) // 3) + 1 + @property + def day(self) -> int: + """ + Return the day of the Timestamp. + + Returns + ------- + int + The day of the Timestamp. + + See Also + -------- + Timestamp.week : Return the week number of the year. + Timestamp.weekday : Return the day of the week. + + Examples + -------- + >>> ts = pd.Timestamp("2024-08-31 16:16:30") + >>> ts.day + 31 + """ + return super().day + @property def week(self) -> int: """