Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,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.fold GL08" \
-i "pandas.Timestamp.max PR02" \
-i "pandas.Timestamp.min PR02" \
-i "pandas.Timestamp.nanosecond GL08" \
Expand Down
24 changes: 24 additions & 0 deletions pandas/_libs/tslibs/timestamps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,30 @@ cdef class _Timestamp(ABCTimestamp):
"""
return super().day

@property
def fold(self) -> int:
"""
Return the fold value of the Timestamp.

Returns
-------
int
The fold value of the Timestamp, where 0 indicates the first occurrence
of the ambiguous time, and 1 indicates the second.

See Also
--------
Timestamp.dst : Return the daylight saving time (DST) adjustment.
Timestamp.tzinfo : Return the timezone information associated.

Examples
--------
>>> ts = pd.Timestamp("2024-11-03 01:30:00")
>>> ts.fold
0
"""
return super().fold

@property
def month(self) -> int:
"""
Expand Down