Skip to content

Commit 3695024

Browse files
adding docstring for pandas.Timestamp.day property
1 parent 7bd6ca2 commit 3695024

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
179179
-i "pandas.TimedeltaIndex.nanoseconds SA01" \
180180
-i "pandas.TimedeltaIndex.seconds SA01" \
181181
-i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \
182-
-i "pandas.Timestamp.day GL08" \
183182
-i "pandas.Timestamp.fold GL08" \
184183
-i "pandas.Timestamp.hour GL08" \
185184
-i "pandas.Timestamp.max PR02" \

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,29 @@ cdef class _Timestamp(ABCTimestamp):
961961
"""
962962
return ((self.month - 1) // 3) + 1
963963
964+
@property
965+
def day(self) -> bool:
966+
"""
967+
Return the day of the Timestamp.
968+
969+
Returns
970+
-------
971+
int
972+
The day of the Timestamp.
973+
974+
See Also
975+
--------
976+
Timestamp.week : Return the week number of the year.
977+
Timestamp.weekday : Return the day of the week.
978+
979+
Examples
980+
--------
981+
>>> ts = pd.Timestamp("2024-08-31 16:16:30")
982+
>>> ts.day
983+
31
984+
"""
985+
return super().day
986+
964987
@property
965988
def week(self) -> int:
966989
"""

0 commit comments

Comments
 (0)